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

Dhruv Vats commented on ARROW-15089:
------------------------------------

I thought to ask this before I got too confused. Some (possibly very naive) 
questions:
 * Is {{{}MapArray{}}}, which inherits from {{{}ListArray{}}}, a collection of 
individual {{{}MapTypes{}}}, each of which in turn are a like {{{}List [ 
Struct1 \{key, value}, Struct2 \{key, value}, ... ]{}}}?
 * Arrow doesn't restrict the DataType {{key}} takes on, so what is the correct 
way to take it as a parameter to a {{{}kernel{}}}.
 * Some kernels use {{Call}} while others use {{{}ExecSomething{}}}, what are 
the prerequisites/strategies/reasonings behind these?
 * If the {{MapArray}} definition in the first point is correct, how do the 
{{MapArray.keys/items}} work? Do they return a _combined_ Array of keys/items? 
If so, then iterating and checking for matches in this {{keys}} Array is what 
we are looking for here?

I'm pretty sure I'm getting a lot of things mixed up. Still finding my way 
through the expansive Arrow type system, where each subdirectory is like a 
codebase in itself it seems.

> [C++] Add compute kernel to get MapArray value for given key
> ------------------------------------------------------------
>
>                 Key: ARROW-15089
>                 URL: https://issues.apache.org/jira/browse/ARROW-15089
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>    Affects Versions: 6.0.1
>            Reporter: Will Jones
>            Assignee: Dhruv Vats
>            Priority: Major
>              Labels: C++, Kernels, beginner, compute, good-second-issue, 
> kernel
>
> Given a "map", an obvious operation is to get an item corresponding to a key. 
> The idea here is to create a kernel that does this for each map in the array.
> IIRC MapArray isn't guaranteed to have unique keys. So one version would 
> return an array of ItemType by returning the first of last item for a given 
> key. Yet another version could return a ListType containing all matching 
> items. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to