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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]