nastra commented on code in PR #12670:
URL: https://github.com/apache/iceberg/pull/12670#discussion_r2026831937


##########
core/src/main/java/org/apache/iceberg/MetadataUpdateParser.java:
##########
@@ -557,11 +564,18 @@ private static MetadataUpdate readAddSnapshot(JsonNode 
node) {
   private static MetadataUpdate readRemoveSnapshots(JsonNode node) {
     Set<Long> snapshotIds = JsonUtil.getLongSetOrNull(SNAPSHOT_IDS, node);
     Preconditions.checkArgument(
-        snapshotIds != null && snapshotIds.size() == 1,
-        "Invalid set of snapshot ids to remove. Expected one value but 
received: %s",
+        snapshotIds != null,
+        "Invalid set of snapshot ids to remove. Expected at least 1 value but 
received: %s",
         snapshotIds);
-    Long snapshotId = Iterables.getOnlyElement(snapshotIds);
-    return new MetadataUpdate.RemoveSnapshot(snapshotId);
+    // TODO: Remove condition once RemoveSnapshot is deprecated and removed

Review Comment:
   can be removed



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