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

Refactor GlueCatalog's _commit_table #653

Merged
merged 4 commits into from
Apr 25, 2024

Conversation

HonahX
Copy link
Contributor

@HonahX HonahX commented Apr 24, 2024

In #498, the createTableTransaction API requires the _commit_table to handle both table update and table creation. This PR refactors Glue's _commit_table to re-use codes such as requirements validation, metadata update, and new metadata write between the two workflows.

This refactoring also solves an extreme case where the table gets dropped after _commit_table load the current table and before _commit_table update the table. In the previous implementation, the code will accidently slip to the table creation workflow and incorrectly create the table.

Try to see if similar implementation pattern can be applied to Hive and Sql in #611

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.

I like it @HonahX Thanks for refactoring this 👍

@Fokko Fokko merged commit f72e363 into apache:main Apr 25, 2024
7 checks passed
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