Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit251d468

Browse files
authored
fix: NPE issue with testMultipleRuns (#2050)
Added a `null` check for `firstPage.getSchema()` as we might get null schema when the job is long running (We get schema using dryRun in such cases)Fixes#2049 ☕️
1 parentbf77967 commit251d468

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionImpl.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,10 @@ public BigQueryResult executeSelect(
234234
BigQueryResultgetResultSet(
235235
GetQueryResultsResponsefirstPage,JobIdjobId,Stringsql,BooleanhasQueryParameters) {
236236
if (firstPage.getJobComplete()
237-
&&firstPage.getTotalRows()
238-
!=null) {// firstPage.getTotalRows() is null if job is not complete
237+
&&firstPage.getTotalRows() !=null
238+
&&firstPage.getSchema()
239+
!=null) {// firstPage.getTotalRows() is null if job is not complete. We need to make
240+
// sure that the schema is not null, as it is required for the ResultSet
239241
returngetSubsequentQueryResultsWithJob(
240242
firstPage.getTotalRows().longValue(),
241243
(long)firstPage.getRows().size(),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp