Fixed catalog import error to Hive 2.2 and 2.3 for Hive Metastore Migration tool #172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Hive 2.2.0 added
IS_REWRITE_ENABLEDcolumn to TBLS table. It doesn't accept NULL and not have default value until Hive 3.0.0.Due to the change, the Hive Metastore migration tool fails to update TBLS table for Hive 2.2.0-2.3.x metastore because the column doesn't have a default value.
Sample error message when importing Glue metastore into Hive metastore 2.3.9.
References:
Fix
If the
IS_REWRITE_ENABLEDcolumn exists in TBLS table on the metastore, set the default value (0).Tests
For Hive 2.3 to check if the issue is resolved
Steps
Result
Succeeded and tables were imported.
For Hive 2.1 to check if it works with the TBLS table which doesn't have IS_REWRITE_ENABLED column
Steps
Result
Succeeded and tables were imported.
For Hive 3.x to test regression
Steps
Result
Succeeded and tables were imported