-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[BigQueryIO] Use final destination table schema and metadata when creating temp tables #24471
Conversation
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
Run Java PreCommit |
1 similar comment
Run Java PreCommit |
Thanks for the quick fix. Just wondering why we do not need the condition of |
I believe it's an unnecessary check, since those are the only two existing CreateDispositions: Line 2170 in 46919b7
that condition will always be true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This LGTM
java precommit test failure irrelevant flake: |
…ating temp tables (apache#24471) * always attempt to match tables with final destination * do not match when schema update options exist * spotless
Fixes #22372
When we create temp tables, the jobs we send will naturally have
CREATE_IF_NEEDED
disposition. Users are facing a problem when writing withCREATE_NEVER
, which makes providing a schema optional. When no schema is provided, the job that creates temp tables is sent with a null schema and an error is thrown.The changes in this PR uses a DynamicDestinations object that returns the schema of the table when the user-provided schema is null.
Note: this code was removed in #17365 because SchemaUpdateOptions were introduced for temp tables. This PR matches the destination schema only when no SchemaUpdateOptions are provided