stevenzwu commented on code in PR #13647:
URL: https://github.com/apache/iceberg/pull/13647#discussion_r2226397030


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1424,14 +1424,12 @@ public Builder removeSnapshots(Collection<Long> 
idsToRemove) {
     private Builder rewriteSnapshotsInternal(Collection<Long> idsToRemove, 
boolean suppress) {
       List<Snapshot> retainedSnapshots =
           Lists.newArrayListWithExpectedSize(snapshots.size() - 
idsToRemove.size());
-      Set<Long> snapshotIdsToRemove = Sets.newHashSet();
-
       for (Snapshot snapshot : snapshots) {
         long snapshotId = snapshot.snapshotId();
         if (idsToRemove.contains(snapshotId)) {
           snapshotsById.remove(snapshotId);
           if (!suppress) {
-            snapshotIdsToRemove.add(snapshotId);
+            changes.add(new MetadataUpdate.RemoveSnapshots(snapshotId));

Review Comment:
   this is where it differs with PR #13100.
   
   `RemoveSnapshots` was removed in main branch for the deprecation cycle for 
1.10. Switching to `RemoveSnapshots` as suggested by @amogh-jahagirdar. All 
servers should support `RemoveSnapshots` with a single snapshot id. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to