asheeshgarg commented on issue #14812:
URL: https://github.com/apache/arrow/issues/14812#issuecomment-1335571576
@lidavidm @lwhite1
Based on the suggestion I tried below
`
VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schema,
allocator);
FlightClient.ClientStreamListener clientStreamListener =
flightClient.startPut(
FlightDescriptor.path("profiles"),
vectorSchemaRoot, new AsyncPutListener());
VectorLoader loader = new VectorLoader(vectorSchemaRoot);
int rows = 0;
try (VectorizedTableScanIterable itr = new
VectorizedTableScanIterable(filteredScan, 10000, false); ) {
for (ColumnarBatch batch : itr) {
VectorSchemaRoot root =
batch.createVectorSchemaRootFromVectors();
VectorUnloader unloader;
unloader = new VectorUnloader(root);
final ArrowRecordBatch arrowRecordBatch =
unloader.getRecordBatch();
loader.load(arrowRecordBatch);
rows += root.getRowCount();
}
clientStreamListener.putNext();
}
vectorSchemaRoot.setRowCount(rows);
clientStreamListener.completed();
System.out.println("pushed all the data. Client Stream
Listener is completed");
}
`
I am getting Utf8. error message: A buffer can only be associated between
two allocators that share the same root
Does it mean the schema of the types as different that I am trying to load
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]