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/11/19 23:29:52 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #6220: API: Make the PartitionSpec less lazy

rdblue commented on code in PR #6220:
URL: https://github.com/apache/iceberg/pull/6220#discussion_r1027159134


##########
core/src/main/java/org/apache/iceberg/util/SortOrderUtil.java:
##########
@@ -67,16 +66,16 @@ public static SortOrder buildSortOrder(Schema schema, PartitionSpec spec, SortOr
 
     // make a map of the partition fields that need to be included in the clustering produced by the
     // sort order
-    Map<Pair<Transform<?, ?>, Integer>, PartitionField> requiredClusteringFields =
+    Map<Pair<String, Integer>, PartitionField> requiredClusteringFields =
         requiredClusteringFields(spec);
 
     // remove any partition fields that are clustered by the sort order by iterating over a prefix
     // in the sort order.
     // this will stop when a non-partition field is found, or when the sort field only satisfies the
     // partition field.
     for (SortField sortField : sortOrder.fields()) {
-      Pair<Transform<?, ?>, Integer> sourceAndTransform =
-          Pair.of(sortField.transform(), sortField.sourceId());
+      Pair<String, Integer> sourceAndTransform =
+          Pair.of(sortField.transform().dedupName(), sortField.sourceId());

Review Comment:
   I think this needs to be `toString` rather than `dedupName`. The `dedupName` method should not really be public and shouldn't be used for cases like this. We want the actual transform here.



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