You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Bryan Cutler (Jira)" <ji...@apache.org> on 2019/11/05 00:54:00 UTC

[jira] [Commented] (ARROW-6820) [C++] [Doc] [Format] Map specification and implementation inconsistent

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

Bryan Cutler commented on ARROW-6820:
-------------------------------------

I don't have a strong preference to specific naming, but we should try to be consistent.  In C++ it is very confusing because many APIs are "key" and "item" because when MapArray is viewed as a list of structs, the term "value" would mean an element in the struct array. Also, there could be conflicts because "value" is already used in List APIs. I think we should stick with the terminology from Schema.fbs where map type is specified as having a child field "entry", itself with children "key" and "value". In C++ we could work around the API by overriding then renaming, e.g. {code}std::shared_ptr<Array> MapArray::list_values() { return ListArray::values(); }{code}

> [C++] [Doc] [Format] Map specification and implementation inconsistent
> ----------------------------------------------------------------------
>
>                 Key: ARROW-6820
>                 URL: https://issues.apache.org/jira/browse/ARROW-6820
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Documentation, Format
>            Reporter: Antoine Pitrou
>            Priority: Blocker
>             Fix For: 1.0.0
>
>
> In https://arrow.apache.org/docs/format/Layout.html#map-type, the map type is specified as having a child field "pairs", itself with children "keys" and "items".
> In https://github.com/apache/arrow/blob/master/format/Schema.fbs#L60, the map type is specified as having a child field "entry", itself with children "key" and "value".
> In the C++ implementation, a map type has a child field "entries", itself with children "key" and "value".



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