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

A. Coady commented on ARROW-15152:
----------------------------------

 
Yes. Here's an example with a duplicate arg, just to distinguish it from 
`hash_distinct`.
||Arg||Key||
|Yo|1|
|Hello|2|
|Howdy|2|
|Wassup|1|
|Yolo|3|
|Yolo|3|
||hash_list(Arg)||Key||
|[Yo, Wassup]|1|
|[Hello, Howdy]|2|
|[Yolo, Yolo]|3|

An alternative proposal: internally it's probably more efficient to have 
`hash_indices`, since those could be applied to any other array later.
||Key||
||1||
||2||
||2||
||1||
||3||
||3||
||hash_indices||Key||
|[0, 3]|1|
|[1, 2]|2|
|[4, 5]|3|

But maybe that doesn't fit well with the current grouping interface, since 
there'd be no need for the "arg" input.

 

 

 

> Implement a `hash_list` aggregate function.
> -------------------------------------------
>
>                 Key: ARROW-15152
>                 URL: https://issues.apache.org/jira/browse/ARROW-15152
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++, Python
>    Affects Versions: 6.0.1
>            Reporter: A. Coady
>            Assignee: Dhruv Vats
>            Priority: Major
>              Labels: good-second-issue, kernel
>
> For more advanced aggregations, it's helpful to be able to gather the grouped 
> values into a list array. Pandas and Polars both have that feature. And 
> `hash_distinct` already aggregates to lists, so all the building blocks are 
> there.



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

Reply via email to