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



##########
File path: core/src/main/java/org/apache/iceberg/BaseUpdatePartitionSpec.java
##########
@@ -290,7 +292,9 @@ private void 
checkForRedundantAddedPartitions(PartitionField field) {
     ImmutableMap.Builder<Pair<Integer, String>, PartitionField> builder = 
ImmutableMap.builder();
     List<PartitionField> fields = spec.fields();
     for (PartitionField field : fields) {
-      builder.put(Pair.of(field.sourceId(), field.transform().toString()), 
field);
+      if (!field.transform().isVoid()) {

Review comment:
       In that case, I think we should use `Maps.newHashMap` instead of 
`ImmutableMap.Builder`. That way we don't need to change the `Transform` API to 
add `isVoid`.




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