sfc-gh-rspitzer commented on code in PR #15150:
URL: https://github.com/apache/iceberg/pull/15150#discussion_r2957359081
##########
core/src/main/java/org/apache/iceberg/util/SortOrderUtil.java:
##########
@@ -46,6 +46,23 @@ public static SortOrder buildSortOrder(Table table,
SortOrder sortOrder) {
return buildSortOrder(table.schema(), table.spec(), sortOrder);
}
+ /**
+ * Attempts to match a user-supplied {@link SortOrder} with an equivalent
sort order from a {@link
+ * Table}.
+ *
+ * @param table the table to try and match the sort order against
+ * @param userSuppliedSortOrder the user supplied sort order to try and
match with a table sort
+ * order
+ * @return the matching {@link SortOrder} from the table (with the orderId
set) or {@link
+ * SortOrder#unsorted()} if no match is found.
+ */
+ public static SortOrder maybeFindTableSortOrder(Table table, SortOrder
userSuppliedSortOrder) {
Review Comment:
nit: findTableSortOrder? We tend not to use maybes in lookups methods.
--
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]