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 2021/02/16 02:09:34 UTC

[GitHub] [iceberg] aokolnychyi commented on a change in pull request #2239: Core: Support unpartitioned specs in SortOrderUtil

aokolnychyi commented on a change in pull request #2239:
URL: https://github.com/apache/iceberg/pull/2239#discussion_r576507316



##########
File path: core/src/main/java/org/apache/iceberg/util/SortOrderUtil.java
##########
@@ -37,16 +37,14 @@ private SortOrderUtil() {
   }
 
   public static SortOrder buildSortOrder(Table table) {
-    return buildSortOrder(table.spec(), table.sortOrder());
+    return buildSortOrder(table.schema(), table.spec(), table.sortOrder());
   }
 
-  public static SortOrder buildSortOrder(PartitionSpec spec, SortOrder sortOrder) {
+  public static SortOrder buildSortOrder(Schema schema, PartitionSpec spec, SortOrder sortOrder) {
     if (sortOrder.isUnsorted() && spec.isUnpartitioned()) {
       return SortOrder.unsorted();
     }
 
-    Schema schema = spec.schema();

Review comment:
       It wasn't possible to call this method with `PartitionSpec.unpartitioned()` as the schema in the spec was empty.




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

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