kevinjqliu opened a new issue, #13833:
URL: https://github.com/apache/iceberg/issues/13833

   ### Feature Request / Improvement
   
   ### Description
   Iceberg validates conflicts between schema field names and partition field 
names when adding a partition field. For example, in 
[`checkAndAddPartitionName`](https://github.com/apache/iceberg/blob/4dbc7f578eee7ceb9def35ebfa1a4cc236fb598f/api/src/main/java/org/apache/iceberg/PartitionSpec.java#L392-L416),
 conflicts are rejected unless it’s an identity/void transform sourced from the 
same field.
   
   However, the same validation is missing during schema evolution. If a user 
later adds or renames a schema column to the same name as a partition field, 
the conflict is not detected. This creates ambiguity and may cause incorrect 
behavior at query or planning time.
   
   We should add a similar check when adding a new column to the table schema 
([`SchemaUpdate`](https://github.com/apache/iceberg/blob/4dbc7f578eee7ceb9def35ebfa1a4cc236fb598f/core/src/main/java/org/apache/iceberg/SchemaUpdate.java#L48))
   
   Found this edge case while we were implementing the same check in pyiceberg, 
https://github.com/apache/iceberg-python/pull/2305
   
   ### Query engine
   
   None
   
   ### Willingness to contribute
   
   - [ ] I can contribute this improvement/feature independently
   - [ ] I would be willing to contribute this improvement/feature with 
guidance from the Iceberg community
   - [x] I cannot contribute this improvement/feature at this time


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

Reply via email to