[HUDI-7242] Avoid unnecessary bigquery table update when using sync tool #10374
+44
−5
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.
Change Logs
The PR added a table schema update step for bigquery sync tool. It seems there're two issues (this PR focuses on the 1st one):
When it reform the schema which is then compared to the bq table schema, the reformed schema puts partition fields in the beginning, while the bq table schema by default has partition fields at the end. So it unnecessarily triggers a schema update due to to order difference.
Though the sync tool for 0.14.0 does not support big lake connection id (there's a recent PR last month adding this support), a user can still recreate their table manually by adding connection id. The table update is adding the new schema into. external table definition. This does not work for biglake tables, and will cause error: "Schema can be specified only on the Table.Schema field for external tables with an associated connection_id but schema was provided on Table.Externaldataconfig.Schema".
Impact
Avoid the unnecessary table update.
Risk level (write none, low medium or high below)
low. It only corrects the order of fields.
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist