zhangjun0x01 commented on a change in pull request #1704:
URL: https://github.com/apache/iceberg/pull/1704#discussion_r517725071



##########
File path: 
core/src/main/java/org/apache/iceberg/actions/BaseRewriteDataFilesAction.java
##########
@@ -228,9 +228,18 @@ public RewriteDataFilesActionResult execute() {
         .flatMap(Streams::stream)
         .collect(Collectors.toList());
 
+    // add a filter  to the CombinedScanTask list to avoid repeated rewrite 
datafile
+    List<CombinedScanTask> fileterCombinedScanTasks =
+        combinedScanTasks.stream().filter(task -> task.files().size() > 
1).collect(Collectors.toList());

Review comment:
       > Could also push this into the build of Combined scan tasks on line 
228, rather than doing a new variable
   
   I refer to the variable filteredGroupedTasks above,maybe it is more clear




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

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