RussellSpitzer commented on code in PR #4377:
URL: https://github.com/apache/iceberg/pull/4377#discussion_r844008334


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseRewriteDataFilesSparkAction.java:
##########
@@ -352,6 +354,27 @@ private Result 
doExecuteWithPartialProgress(RewriteExecutionContext ctx, Stream<
             return new RewriteFileGroup(info, tasks);
           });
         });
+
+    return rewriteFileGroupStream.sorted(rewriteGroupComparator());
+  }
+
+  private Comparator<RewriteFileGroup> rewriteGroupComparator() {
+    if (rewriteJobOrder.equals(RewriteJobOrder.BYTES_ASC.orderName())) {
+      // Rewrite the smallest job groups first

Review Comment:
   docs probably aren't needed here, I think everything will be clear when we 
change the RewriteFileGroup method names



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