8000 fix: keep `RowIterator.total_rows` populated after iteration by tswast · Pull Request #1748 · googleapis/python-bigquery · GitHub
[go: up one dir, main page]

Skip to content

Conversation

tswast
Copy link
Contributor
@tswast tswast commented Dec 8, 2023

Split out of #1722

This was being reset in some cases when the rows were all available in the first page of results.

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)

Fixes #589 🦕

This was being reset in some cases when
the rows were all available in the
first page of results.
@tswast tswast requested review from a team as code owners December 8, 2023 02:01
@tswast tswast requested a review from chalmerlowe December 8, 2023 02:01
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery API. labels Dec 8, 2023
@tswast
Copy link
Contributor Author
tswast commented Dec 8, 2023

Alternatively, we could populate totalRows here if present:

Not sure which to prefer, but this way involved updating fewer tests.

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
@tswast tswast enabled auto-merge (squash) December 8, 2023 21:36
@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 8, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 8, 2023
@tswast tswast merged commit 8482f47 into main Dec 8, 2023
@tswast tswast deleted the issue589-total_rows branch December 8, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide support for synchronous queries through the v2/projects/{projectId}/queries endpoint
3 participants
0