[ https://issues.apache.org/jira/browse/ARROW-5745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874497#comment-16874497 ]
Benjamin Kietzman commented on ARROW-5745: ------------------------------------------ Using "values" at all is very confusing since we already use that as the noun which indicates what occupies an array slot (see [Layout.rst|https://github.com/apache/arrow/blob/master/docs/source/format/Layout.rst#definitions--terminology]). It would really help in explaining List if we used another word here to indicate what occupies slots in List's child array; "items" or "entries" would be equally expressive and are less heavily overloaded. As it is, "value" is used for both purposes, [*in the same sentence* of Layout.rst.|https://github.com/apache/arrow/blob/master/docs/source/format/Layout.rst#list-type] Using "values" in the context of Map is probably unavoidable due to the very strong convention of naming elements of the range and domain of a mapping its "keys" and "values". (A related Python-specific convention is to name the sequence of key-value pairs "items", as in `dict`.) However by renaming `ListArray::values` at least we can avoid collision between the expectation that `map_array.values()` will yield the array of all mapped values and the reality that it will return the array of key-value pairs, and without adding a prefix. > [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)