tisonkun commented on issue #465:
URL: https://github.com/apache/arrow-java/issues/465#issuecomment-2562177569

   That seems exactly what the inner of `Table` does. Do we have some util or a 
`copy` method for that. Or I just wrap by myself .. It seems quite a common 
usage and I don't want to hook outside of arrow-java.
   
   ```java
   while (reader.loadNextBatch()) {
       final VectorSchemaRoot source = reader.getVectorSchemaRoot();
       final VectorUnloader unloader = new VectorUnloader(source);
       final VectorSchemaRoot copy = 
VectorSchemaRoot.create(source.getSchema(), allocator);
       final VectorLoader loader = new VectorLoader(copy);
       loader.load(unloader.getRecordBatch());
       batches.add(copy);
   }
   ```


-- 
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]

Reply via email to