ebyhr commented on code in PR #12909:
URL: https://github.com/apache/iceberg/pull/12909#discussion_r2062933602


##########
core/src/main/java/org/apache/iceberg/MetadataUpdateParser.java:
##########
@@ -563,7 +556,7 @@ private static MetadataUpdate readRemoveSnapshots(JsonNode 
node) {
     MetadataUpdate metadataUpdate;
     if (snapshotIds.size() == 1) {
       Long snapshotId = Iterables.getOnlyElement(snapshotIds);
-      metadataUpdate = new MetadataUpdate.RemoveSnapshot(snapshotId);
+      metadataUpdate = new MetadataUpdate.RemoveSnapshots(snapshotId);

Review Comment:
   I think we can initialize `RemoveSnapshots` without the `snapshotIds` size 
check now. 
   ```java
     private static MetadataUpdate readRemoveSnapshots(JsonNode node) {
       Set<Long> snapshotIds = JsonUtil.getLongSetOrNull(SNAPSHOT_IDS, node);
       Preconditions.checkArgument(
           snapshotIds != null,
           "Invalid set of snapshot ids to remove: must be non-null",
           snapshotIds);
       return new MetadataUpdate.RemoveSnapshots(snapshotIds);
     }
   ```



-- 
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

Reply via email to