Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

perf: use jobs.getQueryResults to download result sets - #363

Merged
tswast merged 7 commits into
googleapis:masterfrom
tswast:issue362-getQueryResults-RowIterator
Nov 4, 2020
Merged

perf: use jobs.getQueryResults to download result sets#363
tswast merged 7 commits into
googleapis:masterfrom
tswast:issue362-getQueryResults-RowIterator

Conversation

@tswast

@tswasttswast commented Nov 3, 2020

Copy link
Copy Markdown
Contributor

Replaces tabledata.list when RowIterator is used for query results.
This likely also fixes a few edge cases around BigQuery scripting jobs.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Based on #361
Towards #362 🦕

Original paths are retained for backwards compatibility.
Replaces `tabledata.list` when `RowIterator` is used for query results.
This likely also fixes a few edge cases around BigQuery scripting jobs.
@tswast
tswast requested review from a team and shollymanNovember 3, 2020 22:06
@google-clagoogle-claBot added the cla: yes This human has signed the Contributor License Agreement. label Nov 3, 2020
@product-auto-labelproduct-auto-labelBot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Nov 3, 2020
@tswasttswast added the status: blocked Resolving the issue is dependent on other work. label Nov 3, 2020
@tswasttswast removed the status: blocked Resolving the issue is dependent on other work. label Nov 4, 2020
@tswasttswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 4, 2020
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 4, 2020

@shollymanshollyman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. If you end up reusing _list_rows_from_query_results for the done polling you may need to consider that explicit project list, but it seems you're being distinct between the job polling and iteration usages here.

Comment threadgoogle/cloud/bigquery/client.py
@tswast
tswast merged commit 0c3476d into googleapis:masterNov 4, 2020
@tswast
tswast deleted the issue362-getQueryResults-RowIterator branch November 4, 2020 19:42
@tswasttswast mentioned this pull request Nov 5, 2020
7 tasks
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tswast@shollyman@yoshi-kokoro