feat: run BQ queries as single statement#11904
Merged
betodealmeida merged 4 commits intoapache:masterfrom Dec 3, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11904 +/- ##
==========================================
- Coverage 63.78% 63.78% -0.01%
==========================================
Files 927 927
Lines 45006 45011 +5
Branches 4308 4308
==========================================
+ Hits 28708 28711 +3
- Misses 16120 16122 +2
Partials 178 178
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
villebro
approved these changes
Dec 3, 2020
Member
villebro
left a comment
There was a problem hiding this comment.
Nice, super happy to see this collaborative effort materialize like this! Minor non-blocking nit, LGTM.
Co-authored-by: Ville Brofeldt <[email protected]>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
SUMMARY
When running multiple statements, BigQuery will not keep track of state during the lifetime of the cursor. This means that queries like this one will fail:
See discussion here: googleapis/python-bigquery#377
This PR solves this problem by running queries as a single statement
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION