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

Carter Shanklin commented on HIVE-4966:
---------------------------------------

Hi Harish,

I recently found need for a collect_array UDF that would maintain ordering and 
duplicates. I actually just changed a few things out of collect_set. Do you 
think that a collect_array would be generally useful? If so, would it make 
sense to combine these into one UDAF to minimize code duplication?
                
> Introduce Collect_Map UDAF
> --------------------------
>
>                 Key: HIVE-4966
>                 URL: https://issues.apache.org/jira/browse/HIVE-4966
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Harish Butani
>            Assignee: Harish Butani
>
> Similar to Collect_Set. For e.g. on a Txn table
> {noformat}
> Txn(customer, product, amt)
> select customer, collect_map(product, amt)
> from txn
> group by customer
> {noformat}
> Would give you an activity map for each customer.
> Other thoughts:
> - have explode do the inverse on maps just as it does for sets today.
> - introduce a table function that outputs each value as a column. So in the 
> e.g. above you get an activity matrix instead of a map. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to