szehon-ho commented on a change in pull request #2240:
URL: https://github.com/apache/iceberg/pull/2240#discussion_r691713037



##########
File path: core/src/main/java/org/apache/iceberg/util/SortOrderUtil.java
##########
@@ -64,4 +68,16 @@ static SortOrder buildSortOrder(Schema schema, PartitionSpec 
spec, SortOrder sor
 
     return builder.build();
   }
+
+  public static Set<String> sortedColumns(SortOrder sortOrder) {
+    if (sortOrder == null) {
+      return Collections.emptySet();
+    } else {
+      return sortOrder.fields().stream()
+          .map(SortField::sourceId)
+          .map(sid -> sortOrder.schema().findColumnName(sid))

Review comment:
       Yea makes sense.  I wonder a bit the use case for sorting by bucket(id), 
but in that case it makes sense to not promote it.




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