rdblue commented on code in PR #4071:
URL: https://github.com/apache/iceberg/pull/4071#discussion_r841294251


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1048,9 +1100,14 @@ public Builder removeSnapshots(Collection<Long> 
idsToRemove) {
           danglingRefs.add(refEntry.getKey());
         }
       }
-
-      danglingRefs.forEach(this::removeBranch);
-
+      for (String danglingRef : danglingRefs) {
+        SnapshotRef ref = refs.get(danglingRef);
+        if (ref.isTag()) {
+          removeTag(danglingRef);
+        } else {
+          removeBranch(danglingRef);

Review Comment:
   Why not just have a combined removeRef method?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to