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


##########
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())) {

Review Comment:
   Since you have an enum you can do 
   ```
   switch(rewriteJobOrder) {
      case: BYTES_ASC
      ....
   }



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