8000 [Bug fix] update name mapping in Transaction.update_schema by sungwy · Pull Request #508 · apache/iceberg-python · GitHub
[go: up one dir, main page]

Skip to content

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

0