Skip to content
Permalink
Browse files
fix: npe for destination table (#699)
  • Loading branch information
Praful Makani committed Aug 26, 2020
1 parent e3a021b commit 863c9e1d7da8a63154677fb32954e2048dd48e9e
Showing with 4 additions and 1 deletion.
  1. +4 −1 google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Job.java
@@ -308,7 +308,10 @@ public TableResult getQueryResults(QueryResultsOption... options)
return new EmptyTableResult(response.getSchema());
}

TableId table = ((QueryJobConfiguration) getConfiguration()).getDestinationTable();
TableId table =
((QueryJobConfiguration) getConfiguration()).getDestinationTable() == null
? ((QueryJobConfiguration) job.getConfiguration()).getDestinationTable()
: ((QueryJobConfiguration) getConfiguration()).getDestinationTable();
return bigquery.listTableData(
table, response.getSchema(), listOptions.toArray(new TableDataListOption[0]));
}

0 comments on commit 863c9e1

Please sign in to comment.