nastra commented on code in PR #12670: URL: https://github.com/apache/iceberg/pull/12670#discussion_r2021074800
########## core/src/main/java/org/apache/iceberg/MetadataUpdate.java: ########## @@ -328,20 +328,20 @@ public void applyTo(TableMetadata.Builder metadataBuilder) { } } - class RemoveSnapshot implements MetadataUpdate { - private final long snapshotId; + class RemoveSnapshots implements MetadataUpdate { + private final Set<Long> snapshotIds; - public RemoveSnapshot(long snapshotId) { - this.snapshotId = snapshotId; + public RemoveSnapshots(Set<Long> snapshotIds) { + this.snapshotIds = snapshotIds; } - public long snapshotId() { - return snapshotId; + public Set<Long> snapshotIds() { + return snapshotIds; } @Override public void applyTo(TableMetadata.Builder metadataBuilder) { - metadataBuilder.removeSnapshots(ImmutableSet.of(snapshotId)); + metadataBuilder.removeSnapshots(snapshotIds); } Review Comment: yes the `RemoveSnapshot` class needs to stay so that we don't break existing APIs, but should be marked deprecated (and refer to using the new API - we do it similarly in other places that are deprecated). Then you can introduce a new `RemoveSnapshots` API, which the `TableMetadata` Builder would call -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org