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

Aldrin Montana commented on ARROW-17257:
----------------------------------------

I was trying to figure out how to access fields of nested data types for 
ARROW-8991. For *StructArray*, it looks like *data_->child_data* is a 
straightforward 
approach([array_nested.cc#L579|https://github.com/apache/arrow/blob/53752adc6b81166cd4ee7db5a819494042f29197/cpp/src/arrow/array/array_nested.cc#L579]).
 However, the most visible solutions are to access *ArraySpan* buffers 
manually, or to take the performance hit to call *ArraySpan::ToArray()*. I 
suspect it is possible to use 
[visit_data_inline.h|https://github.com/apache/arrow/blob/master/cpp/src/arrow/visit_data_inline.h],
 but I'm not yet sure how.

I guess all this to say that it would be cool if, as part of this effort, 
higher level interfaces such as StructArray are able to provide re-usable 
functions, or leverage them, for accessing elements in either *ArraySpan* or 
*KeyColumnArray*. And, if I can help I would be happy to.

> [C++] Unify KeyColumnArray and ArraySpan
> ----------------------------------------
>
>                 Key: ARROW-17257
>                 URL: https://issues.apache.org/jira/browse/ARROW-17257
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Weston Pace
>            Priority: Major
>
> Both of these are essentially non-owning views into ArrayData.  They were 
> developed somewhat independently but share a pretty similar structure.  I 
> don't think we need both and we should unify on a common type for simplicity 
> provided we can show no real performance difference.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to