[
https://issues.apache.org/jira/browse/ARROW-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234837#comment-15234837
]
Kai Zheng commented on ARROW-60:
--------------------------------
There were some discussions in [this
PR|https://github.com/apache/arrow/pull/58] by the way. For convenient copying
here:
Question from Kai:
{quote}
I'm trying to think about how to implement this struct array type, by the way,
seems to need a container for all the child arrays, like vector, to put all the
fields in the declaring order, right? Another question is how to get/set a
field? By name, but no name in the layout, so only possible by index I guess.
Raise my questions here by the way, thx.
{quote}
Replying from [[email protected]]:
{quote}
Its probably better to discuss struct implementation on the relevant JIRA item
for it, but it following the existing pattern Builder with a separate final
immutable data structure pattern. Using a std::vector could work for this, just
be careful not to do anything in the builder's Finish that could fail. Also, I
think indices for getters are the right level of abstraction for this layer (a
different layer can map name->index). I'm currently working through some use
cases with the ListBuilder and that has made me realize the current builder
APIs are super user friendly.
{quote}
> C++: Struct type builder API
> -----------------------------
>
> Key: ARROW-60
> URL: https://issues.apache.org/jira/browse/ARROW-60
> Project: Apache Arrow
> Issue Type: New Feature
> Components: C++
> Reporter: Wes McKinney
> Assignee: Kai Zheng
>
> At the moment, we are able to represent struct metadata but not actually
> build struct-type arrays.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)