Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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! 🙌

pyiceberg/table/__init__.py Outdated Show resolved Hide resolved
pyiceberg/table/name_mapping.py Outdated Show resolved Hide resolved
tests/table/test_name_mapping.py Show resolved Hide resolved
pyiceberg/table/name_mapping.py Outdated Show resolved Hide resolved
sungwy and others added 5 commits February 18, 2024 21:49
Co-authored-by: Fokko Driesprong <fokko@apache.org>
Co-authored-by: Fokko Driesprong <fokko@apache.org>
@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 <fokko@apache.org>

* Update pyiceberg/table/name_mapping.py

Co-authored-by: Fokko Driesprong <fokko@apache.org>

* validation mode after

* type

---------

Co-authored-by: Fokko Driesprong <fokko@apache.org>
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.