use of org.apache.arrow.memory.RootAllocator in project beam by apache.
the class BigQueryIOStorageReadTest method setUp.
@Before
public void setUp() throws Exception {
FakeDatasetService.setUp();
allocator = new RootAllocator(Long.MAX_VALUE);
}
use of org.apache.arrow.memory.RootAllocator in project beam by apache.
the class BigQueryStorageArrowReader method processReadRowsResponse.
@Override
public void processReadRowsResponse(ReadRowsResponse readRowsResponse) throws IOException {
com.google.cloud.bigquery.storage.v1.ArrowRecordBatch recordBatch = readRowsResponse.getArrowRecordBatch();
rowCount = recordBatch.getRowCount();
this.alloc = new RootAllocator(Long.MAX_VALUE);
InputStream input = protoSchema.getSerializedSchema().newInput();
Schema arrowSchema = ArrowConversion.arrowSchemaFromInput(input);
this.recordBatchIterator = ArrowConversion.rowsFromSerializedRecordBatch(arrowSchema, recordBatch.getSerializedRecordBatch().newInput(), this.alloc);
}
Aggregations