vinson0526 commented on a change in pull request #2691:
URL: https://github.com/apache/iceberg/pull/2691#discussion_r650968638
##########
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:
ImmutableMap.Builder disallow multiple entries with same key, and
multiple void transforms with the same source id generate same key here. So
this builder will throw an exception with msg such as "Multiple entries with
same key: (1, void)=1001: create_time_month: void(1) and (1, void)=1000:
create_time_year: void(1)".
--
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]