Skip to content

Commit

Permalink
Check for null for fast query results.getTotalRows()
Browse files Browse the repository at this point in the history
  • Loading branch information
whuffman36 committed Jan 7, 2025
1 parent 788cacd commit cbd3c16
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ private BigQueryResult queryRpc(
// Results should be read using the high throughput read API if sufficiently large.
boolean shouldUseReadApi =
connectionSettings.getUseReadAPI()
&& results.getTotalRows() != null
&& results.getTotalRows().longValue() > connectionSettings.getMinResultSize();
if (results.getJobComplete() && results.getSchema() != null && !shouldUseReadApi) {
return processQueryResponseResults(results);
Expand Down

0 comments on commit cbd3c16

Please sign in to comment.