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/07/07 15:42:34 UTC

[GitHub] [iceberg] RussellSpitzer commented on a diff in pull request #4941: Core: Use Table Partitioning sort with manual Sort Order in Rewrite Data Files

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


##########
core/src/main/java/org/apache/iceberg/actions/SortStrategy.java:
##########
@@ -48,7 +49,7 @@ public abstract class SortStrategy extends BinPackStrategy {
    * @return this for method chaining
    */
   public SortStrategy sortOrder(SortOrder order) {
-    this.sortOrder = order;
+    this.sortOrder = SortOrderUtil.buildSortOrder(table(), order);

Review Comment:
   Would we have the chance of sorting on the same column multiple times here? That would be my only worry now. Like say the table partitioning requires a sort on (X) and then the user specifies the sort order as (y, x) 
   
   Do we we end up doing a (X, Y, X) sort? Which i guess is valid just seems unlikely to be the intent ... I think this is fine at the moment but maybe we throw an error in the future.



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