Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

fix: keep RowIterator.total_rows populated after iteration#1748

Merged
tswast merged 2 commits into
maingoogleapis/python-bigquery:mainfrom
issue589-total_rowsgoogleapis/python-bigquery:issue589-total_rowsCopy head branch name to clipboard
Dec 8, 2023
Merged

fix: keep RowIterator.total_rows populated after iteration#1748
tswast merged 2 commits into
maingoogleapis/python-bigquery:mainfrom
issue589-total_rowsgoogleapis/python-bigquery:issue589-total_rowsCopy head branch name to clipboard

Conversation

@tswast

@tswast tswast commented Dec 8, 2023

Copy link
Copy Markdown
Contributor

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 and 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

tswast commented Dec 8, 2023

Copy link
Copy Markdown
Contributor Author

Alternatively, we could populate totalRows here if present:

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

Comment thread google/cloud/bigquery/table.py Outdated
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.