rdblue commented on a change in pull request #922:
URL: https://github.com/apache/iceberg/pull/922#discussion_r449922830
##########
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:
Shouldn't this use the transform instead? Otherwise, `truncate` would
conflict with `null`, because the key is the same, right?
Also, should we similarly 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]