Skip to content

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.

2 participants