timothyw553 commented on code in PR #19210:
URL: https://github.com/apache/iceberg/pull/19210#discussion_r4795872905


##########
core/src/main/java/org/apache/iceberg/rest/RESTFileScanTaskParser.java:
##########
@@ -87,8 +87,10 @@ public static FileScanTask fromJson(
     if (jsonNode.hasNonNull(DELETE_FILE_REFERENCES)) {
       List<Integer> indices = JsonUtil.getIntegerList(DELETE_FILE_REFERENCES, 
jsonNode);
       Preconditions.checkArgument(
-          indices.isEmpty() || Collections.max(indices) < 
allDeleteFiles.size(),
-          "Invalid delete file references: %s, expected indices < %s",
+          indices.isEmpty()

Review Comment:
   we test `null` references in `nullDeleteFileReferences`, which skips this 
branch, so nothing covers an explicit `[]`. could we add a test sending 
`"delete-file-references":[]` and asserting no deletes so a future edit doesn't 
accidentally hit `Collections.min` on an empty list?



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