Skip to content

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