Skip to content

Commit

Permalink
adjustments to the newer TableResult interface
Browse files Browse the repository at this point in the history
  • Loading branch information
IvaVitanova committed Oct 29, 2024
1 parent 928a0dc commit 9665247
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1529,12 +1529,14 @@ public SyncTableResult syncQuery(QueryJobConfiguration configuration, QueryResul
TableResult tableResult = null;
if (response.getJobComplete()) {
Map<BigQueryRpc.Option, ?> optionMap = optionMap(options);
tableResult = new TableResult(Schema.fromPb(response.getSchema()),
response.getTotalRows().longValue(),
new PageImpl<>(
tableResult = TableResult.newBuilder()
.setSchema(Schema.fromPb(response.getSchema()))
.setTotalRows(response.getTotalRows().longValue())
.setPageNoSchema(new PageImpl<>(
new QueryResponsePageFetcher(jobId, getOptions(), response.getPageToken(), optionMap),
response.getPageToken(),
transformTableData(response.getRows(), Schema.fromPb(response.getSchema()))));
transformTableData(response.getRows(), Schema.fromPb(response.getSchema()))))
.build();
}

return new SyncTableResult(response.getJobComplete(), jobId, tableResult);
Expand Down

0 comments on commit 9665247

Please sign in to comment.