Skip to content

Conversation

sungwy
Copy link
Collaborator

@sungwy sungwy commented Feb 18, 2024

Similar to the Java implementation, we should update the existing name_mapping on update_schema().

Some changes:

  • Table.name_mapping no longer defaults to the auto-generated name_mapping based on the current Schema. We should explicitly return None if the property isn't set, so that we can use the function return value to avoid the additional steps in updating the existing name mapping.
  • I've introduced some changes compared to the Java version. Specifically:

@Fokko Fokko added this to the PyIceberg 0.7.0 release milestone Feb 19, 2024
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @syun64! 🙌

@Fokko Fokko merged commit fd9dc88 into apache:main Feb 20, 2024
@sungwy sungwy deleted the update-mapping branch February 20, 2024 21:59
sungwy added a commit to sungwy/iceberg-python that referenced this pull request Feb 20, 2024
* update name-mapping

* Update __init__.py

Co-authored-by: Fokko Driesprong <[email protected]>

* Update pyiceberg/table/name_mapping.py

Co-authored-by: Fokko Driesprong <[email protected]>

* validation mode after

* type

---------

Co-authored-by: Fokko Driesprong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants