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


##########
core/src/main/java/org/apache/iceberg/util/SortOrderUtil.java:
##########
@@ -74,6 +101,28 @@ public static SortOrder buildSortOrder(Schema schema, 
PartitionSpec spec, SortOr
     return builder.build();
   }
 
+  private static Map<Pair<Transform<?, ?>, Integer>, PartitionField> 
requiredClusteringFields(PartitionSpec spec) {
+    Map<Pair<Transform<?, ?>, Integer>, PartitionField> 
requiredClusteringFields = Maps.newLinkedHashMap();
+    for (PartitionField partField : spec.fields()) {
+      if (!partField.transform().toString().equals("void")) {
+        requiredClusteringFields.put(Pair.of(partField.transform(), 
partField.sourceId()), partField);
+      }
+    }
+
+    // remove any partition fields that are satisfied by another partition 
field, like days(ts) and hours(ts)
+    for (PartitionField partField : spec.fields()) {
+      for (PartitionField field : spec.fields()) {

Review Comment:
   Yeah, I can update. It was more for consistency with the other loop, but I 
think that got moved to a different method because of the complexity.



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