简体   繁体   中英

Java Apache Arrow Copy data from one VectorSchemaRoot to another

If I have a VectorSchemaRoot that already contains data using the the Java Apache Arrow library, how would I go about copying that data to another VectorSchemaRoot ?

What you most commonly would want to do is to create a TransferPair object for each Vector in the source VectorSchemaRoot, to transfer its buffers to new vectors in the second one.

In this case what you have, though, is not really a "copy" as the data is passed from one VSR to another, rather than copied. A typical use-case for this approach is using VectorSchemaRoots in a pipeline where they process data sequentially.

If you could say a bit more about what you're trying to accomplish I might be able to provide a better answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM