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


##########
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",

Review Comment:
   `snapshotIds` will be null in this case, so no need to include the variable 
in the error msg:
   ```suggestion
           "Invalid set of snapshot ids to remove: must be non-null",
   ```



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