File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1616
1717package com .google .cloud .bigquery ;
1818
19+ import com .google .cloud .bigquery .storage .v1 .ArrowSchema ;
1920import java .math .BigDecimal ;
2021import java .sql .Date ;
2122import java .sql .ResultSet ;
2829// TODO: This implementation deals with the JSON response. We can have respective implementations
2930public class BigQueryResultSetImpl <T > implements BigQueryResultSet <T > {
3031
31- private final Schema schema ;
32+ private Schema schema ;
33+ private ArrowSchema arrowSchema ;
3234 private final long totalRows ;
3335 private final BlockingQueue <T > buffer ;
3436 private T cursor ;
3537 private final ResultSetWrapper underlyingResultSet ;
3638 private final BigQueryResultSetStats bigQueryResultSetStats ;
3739
3840 public BigQueryResultSetImpl (
39- Schema schema ,
41+ Object schema ,
4042 long totalRows ,
4143 BlockingQueue <T > buffer ,
4244 BigQueryResultSetStats bigQueryResultSetStats ) {
43- this .schema = schema ;
45+ if (schema instanceof Schema ) {
46+ this .schema = (Schema ) schema ;
47+ } else if (schema instanceof ArrowSchema ) {
48+ this .arrowSchema = (ArrowSchema ) schema ;
49+ }
50+
4451 this .totalRows = totalRows ;
4552 this .buffer = buffer ;
4653 this .underlyingResultSet = new ResultSetWrapper ();
@@ -52,6 +59,8 @@ public Schema getSchema() {
5259 return schema ;
5360 }
5461
62+ // TODO(prasmish): Implement a method to return ArrowSchema
63+
5564 @ Override
5665 public long getTotalRows () {
5766 return totalRows ;
You can’t perform that action at this time.
0 commit comments