[ 
https://issues.apache.org/jira/browse/ARROW-8666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098898#comment-17098898
 ] 

David Li commented on ARROW-8666:
---------------------------------

Hi [~fan_li_ya], loadFieldBuffers should do the trick, thanks for pointing it 
out!

The motivation here is we are constructing a dense union vector where the child 
arrays are in turn struct vectors. Semantically, this is intended as the union 
of distinct top-level schemas so that we can pass through different datasets in 
a single Flight RPC. Ideally we can do this with minimal/no copying or 
allocation, so being able to just transfer the arrays from the input 
VectorSchemaRoots and construct the right type ID and offset buffers is perfect.

> [Java] DenseUnionVector has no way to set offset/validity directly
> ------------------------------------------------------------------
>
>                 Key: ARROW-8666
>                 URL: https://issues.apache.org/jira/browse/ARROW-8666
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Java
>    Affects Versions: 0.17.0
>            Reporter: David Li
>            Priority: Major
>
> You can set the type ID manually, but you cannot set the offset or validity 
> directly. Ideally, we'd have an API like Python that lets us build it 
> directly from constituent vectors and the offsets/type IDs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to