Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 863c9e1

Browse files
author
Praful Makani
authoredAug 26, 2020
fix: npe for destination table (#699)
1 parent e3a021b commit 863c9e1

File tree

1 file changed

+4
-1
lines changed
  • google-cloud-bigquery/src/main/java/com/google/cloud/bigquery

1 file changed

+4
-1
lines changed
 

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ public TableResult getQueryResults(QueryResultsOption... options)
308308
return new EmptyTableResult(response.getSchema());
309309
}
310310

311-
TableId table = ((QueryJobConfiguration) getConfiguration()).getDestinationTable();
311+
TableId table =
312+
((QueryJobConfiguration) getConfiguration()).getDestinationTable() == null
313+
? ((QueryJobConfiguration) job.getConfiguration()).getDestinationTable()
314+
: ((QueryJobConfiguration) getConfiguration()).getDestinationTable();
312315
return bigquery.listTableData(
313316
table, response.getSchema(), listOptions.toArray(new TableDataListOption[0]));
314317
}

0 commit comments

Comments
 (0)
Failed to load comments.