flyrain commented on code in PR #5301:
URL: https://github.com/apache/iceberg/pull/5301#discussion_r929299684


##########
core/src/main/java/org/apache/iceberg/ManifestGroup.java:
##########
@@ -156,6 +156,14 @@ ManifestGroup planWith(ExecutorService newExecutorService) 
{
    * @return a {@link CloseableIterable} of {@link FileScanTask}
    */
   public CloseableIterable<FileScanTask> planFiles() {
+    return plan((entries, ctx) -> CloseableIterable.transform(entries, entry 
-> {
+      DataFile dataFile = entry.file().copy(ctx.shouldKeepStats());
+      DeleteFile[] deleteFiles = ctx.deletes().forEntry(entry);
+      return new BaseFileScanTask(dataFile, deleteFiles, ctx.schemaAsString(), 
ctx.specAsString(), ctx.residuals());
+    }));

Review Comment:
   Nit: I kind of prefer a normal function instead of an anonymous one for 
better readability since we are using the functionInterface here, which needs 
two steps to figure out the types of input parameters.  Or we just use 
`BiFunction`. 



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