You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/28 16:31:01 UTC

[GitHub] [iceberg] RussellSpitzer commented on a diff in pull request #6296: Spark-3.3: Use table sort order with sort strategy when user has not specified

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


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/procedures/RewriteDataFilesProcedure.java:
##########
@@ -184,6 +184,9 @@ private RewriteDataFiles checkAndApplyStrategy(
                 .toArray(String[]::new);
         return action.zOrder(columnNames);
       } else {
+        if (sortOrderFields.isEmpty()) {
+          return action.sort();

Review Comment:
   we cam avoid another level of indentation if we use an else if
   
   ```java
     else if (sortOrdserFields.nonEmpty) {
          return action.sort(buildSortOrder(sortOrderFields, schema));
     } else {
          return action.sort()
     }
   ```



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org