Skip to content

Commit

Permalink
fix: npe for destination table (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
Praful Makani committed Aug 26, 2020
1 parent e3a021b commit 863c9e1
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -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]));
}
Expand Down

0 comments on commit 863c9e1

Please sign in to comment.