amogh-jahagirdar commented on code in PR #14838:
URL: https://github.com/apache/iceberg/pull/14838#discussion_r2616680805
##########
core/src/main/java/org/apache/iceberg/rest/responses/BaseScanTaskResponse.java:
##########
@@ -83,11 +86,21 @@ public B withPlanTasks(List<String> tasks) {
public B withFileScanTasks(List<FileScanTask> tasks) {
this.fileScanTasks = tasks;
+ if (fileScanTasks != null) {
+ this.deleteFiles =
+ DeleteFileSet.of(
+ () -> tasks.stream().flatMap(task ->
task.deletes().stream()).iterator());
+ }
return self();
}
+ /**
+ * @deprecated since 1.11.0, will be removed in 1.12.0.
+ */
+ @Deprecated
public B withDeleteFiles(List<DeleteFile> deleteFilesList) {
- this.deleteFiles = deleteFilesList;
+ Preconditions.checkArgument(deleteFiles == null, "Cannot set delete
files more than once");
Review Comment:
Yeah we can make this a softer check, if it's already not null set it.
--
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]