rdblue commented on a change in pull request #922:
URL: https://github.com/apache/iceberg/pull/922#discussion_r449922937



##########
File path: api/src/main/java/org/apache/iceberg/PartitionSpec.java
##########
@@ -346,11 +346,34 @@ private void checkAndAddPartitionName(String name, 
Integer identitySourceColumnI
       partitionNames.add(name);
     }
 
+    private String getDedupKey(PartitionField field) {
+      String transform = field.transform().toString();
+      String type;
+      if ("hour".equalsIgnoreCase(transform) || 
"day".equalsIgnoreCase(transform) ||
+          "month".equalsIgnoreCase(transform) || 
"year".equalsIgnoreCase(transform)) {
+        type = "time";
+      } else if (transform.startsWith("bucket[")) {
+        type = "bucket";
+      } else {
+        return null;

Review comment:
       What about using the transform name in this situation? Then this would 
always catch duplicate transforms.
   
   Also, should we add a case for `truncate` with different lengths?




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

Reply via email to