[
https://issues.apache.org/jira/browse/ARROW-5745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16875189#comment-16875189
]
Benjamin Kietzman edited comment on ARROW-5745 at 6/28/19 7:51 PM:
-------------------------------------------------------------------
One way to partially resolve this would be to remove Map's inheritance of List
so that there is no name collision over "values". Code which handles both map
and list could be adapted with minimal boilerplate by adding
{{std::shared_ptr<Array> MapArray::\{To,From\}KeyValuePairs()}}
(which will also have minimal runtime overhead since the structures of Map and
List arrays are identical)
was (Author: bkietz):
One way to partially resolve this would be to remove Map's inheritance of List
so that there is no name collision over "values". Code which handles both map
and list could be adapted with minimal boilerplate by adding
{{std::shared_ptr<Array> MapArray::{To,From}KeyValuePairs()}}
> [C++] properties of Map(Array|Type) are confusingly named
> ---------------------------------------------------------
>
> Key: ARROW-5745
> URL: https://issues.apache.org/jira/browse/ARROW-5745
> Project: Apache Arrow
> Issue Type: New Feature
> Components: C++
> Reporter: Benjamin Kietzman
> Assignee: Benjamin Kietzman
> Priority: Major
>
> In the context of ListArrays, "values" indicates the elements in a slot of
> the ListArray. Since MapArray isa ListArray, "values" indicates the same
> thing and the elements are key-item pairs. This naming scheme is not
> idiomatic; these *should* be called key-value pairs but that would require
> propagating the renaming down to ListArray.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)