Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug fix] update name mapping in Transaction.update_schema #508

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

sungwy
Copy link
Collaborator

@sungwy sungwy commented Mar 9, 2024

Also update name mapping if schema is updated through a Transaction.

Related PR

This PR fixes the current behavior, which only updates the name mapping if UpdateSchema is created from the Table.update_schema function. Transaction.update_schema should also pass the name_mapping of the table.

    with simple_table.transaction() as txn:
        with txn.update_schema() as schema_update:
            schema_update.rename_column("bar", "var")

@sungwy sungwy requested review from Fokko and HonahX March 9, 2024 21:37
@sungwy sungwy changed the title [Bug fix] update name mapping in transaction [Bug fix] update name mapping in Transaction.update_schema Mar 9, 2024
Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing this @syun64

@HonahX HonahX merged commit a222825 into apache:main Mar 10, 2024
7 checks passed
@HonahX HonahX modified the milestone: PyIceberg 0.6.1 Mar 26, 2024
@HonahX
Copy link
Contributor

HonahX commented Mar 29, 2024

Remove this from 0.6.1 because this depends on #441, which is a new feature.

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