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



##########
File path: api/src/main/java/org/apache/iceberg/PartitionSpec.java
##########
@@ -405,11 +428,11 @@ public Builder month(String sourceName) {
     }
 
     public Builder day(String sourceName, String targetName) {
-      checkAndAddPartitionName(targetName);
       Types.NestedField sourceColumn = findSourceColumn(sourceName);
       PartitionField field = new PartitionField(
           sourceColumn.fieldId(), nextFieldId(), targetName, 
Transforms.day(sourceColumn.type()));
       checkForRedundantPartitions(field);
+      checkAndAddPartitionName(targetName);

Review comment:
       I think this was needed because of my comment that the duplicate field 
should throw an exception before the duplicate name.




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