rdblue commented on a change in pull request #3421:
URL: https://github.com/apache/iceberg/pull/3421#discussion_r740344049
##########
File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
##########
@@ -755,7 +756,9 @@ private PartitionSpec reassignPartitionIds(PartitionSpec
partitionSpec, TypeUtil
// copy the new field with the existing field ID
specBuilder.add(newField.sourceId(), field.fieldId(),
newField.name(), newField.transform());
} else {
- specBuilder.add(field.sourceId(), field.fieldId(), field.name(),
Transforms.alwaysNull());
+ // Rename old void transforms that would otherwise conflict
+ String voidName = newFieldNames.contains(field.name()) ?
field.name() + "_" + field.fieldId() : field.name();
+ specBuilder.add(field.sourceId(), field.fieldId(), voidName,
Transforms.alwaysNull());
Review comment:
Looks good to me.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]