rdblue commented on a change in pull request #3632:
URL: https://github.com/apache/iceberg/pull/3632#discussion_r763454130
##########
File path: api/src/main/java/org/apache/iceberg/PartitionSpec.java
##########
@@ -332,11 +332,11 @@ private int nextFieldId() {
return lastAssignedFieldId.incrementAndGet();
}
- private void checkAndAddPartitionName(String name) {
- checkAndAddPartitionName(name, null);
+ private void checkAndAddPartitionName(String name, String transformName) {
+ checkAndAddPartitionName(name, null, transformName);
}
- private void checkAndAddPartitionName(String name, Integer sourceColumnId)
{
+ private void checkAndAddPartitionName(String name, Integer sourceColumnId,
String transformName) {
Review comment:
I don't think that modifying `PartitionSpec` is the right approach. The
test shows that the use case is to allow dropping and adding an equivalent
partition field. But what this actually does is allow multiple fields with the
same name but different transforms in the same spec. That is not a valid
operation because we create a schema from the partition spec and schema field
names must be unique.
I think if you want to enable removing and adding equivalent transforms,
you'd need to modify `UpdatePartitionSpec` instead.
--
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]