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


##########
core/src/main/java/org/apache/iceberg/rest/TableScanResponseParser.java:
##########
@@ -119,7 +121,12 @@ public static void serializeScanTasks(
         Set<Integer> deleteFileReferences = Sets.newHashSet();
         if (deleteFiles != null) {
           for (DeleteFile taskDelete : fileScanTask.deletes()) {
-            
deleteFileReferences.add(deleteFilePathToIndex.get(taskDelete.location()));
+            Integer index = 
deleteFileToIndex.get(DeleteFileWrapper.wrap(taskDelete));
+            Preconditions.checkArgument(
+                index != null,
+                "Cannot serialize scan task with delete file missing from 
delete files: %s",

Review Comment:
   I don't see this being exercised anywhere, so would be good to have a test



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