Skip to content

docs(bigquery): Update TableResult.getTotalRows() docstring #3785

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

Merged
merged 1 commit into from
May 7, 2025

Conversation

whuffman36
Copy link
Contributor

After some investigation into Issue #3776, we noticed that getTotalRows() would return 1 for queries that didn't actually return any rows. This docstring explains why the method can potentially return a non-zero value for queries that don't return any rows, such as INSERT, UPDATE, and DELETE.

The reason for this is that the totalRows value can be set to the numDmlAffectedRows in some cases.

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/java-bigquery API. labels May 6, 2025
@whuffman36 whuffman36 self-assigned this May 6, 2025
@whuffman36 whuffman36 marked this pull request as ready for review May 6, 2025 22:58
@whuffman36 whuffman36 requested a review from a team as a code owner May 6, 2025 22:59
@whuffman36 whuffman36 merged commit 6483588 into main May 7, 2025
22 checks passed
@whuffman36 whuffman36 deleted the totalRows branch May 7, 2025 18:01
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/java-bigquery API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants