rutb327 opened a new pull request, #2305: URL: https://github.com/apache/iceberg-python/pull/2305
Closes [#2272](https://github.com/apache/iceberg-python/issues/2272) Collaborator: @geruh # Rationale for this change Implements the validation logic described in [#2272](https://github.com/apache/iceberg-python/issues/2272) to match Java and Rust behavior for partition field name conflicts with schema fields. This mirrors the method in Java checkAndAddPartitionName(): https://github.com/apache/iceberg/blob/4dbc7f578eee7ceb9def35ebfa1a4cc236fb598f/api/src/main/java/org/apache/iceberg/PartitionSpec.java#L392-L416 **Identity transforms** (`sourceColumnID != null`)- Allow schema field name conflicts only when sourced form the same field **Non-identity** (`sourceColumnID == null`)- Disallow any schema field name conflicts. In this PR `isinstance(transform, (IdentityTransform, VoidTransform))` is used to achieve the same logic as Java’s `sourceColumnID` check. # Are these changes tested? Yes, all existing tests pass and added a test covering validation scenarios. # Are there any user-facing changes? Yes. Non-identity transforms can no longer use schema field names as partition field names. -- 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]
