nastra commented on code in PR #14838:
URL: https://github.com/apache/iceberg/pull/14838#discussion_r2618314164
##########
core/src/main/java/org/apache/iceberg/rest/TableScanResponseParser.java:
##########
@@ -77,7 +77,17 @@ public static List<FileScanTask> parseFileScanTasks(
fileScanTaskList.add(fileScanTask);
}
+ if (fileScanTaskList.isEmpty()) {
+ Preconditions.checkArgument(
+ (deleteFiles == null || deleteFiles.isEmpty()),
+ "Invalid response: deleteFiles should only be returned with
fileScanTasks that reference them");
+ }
+
return fileScanTaskList;
+ } else {
+ Preconditions.checkArgument(
+ (deleteFiles == null || deleteFiles.isEmpty()),
Review Comment:
```suggestion
deleteFiles == null || deleteFiles.isEmpty(),
```
--
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]