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

Edward Capriolo commented on HIVE-4966:
---------------------------------------

I have a working collect here 

https://github.com/edwardcapriolo/hive-collect/blob/master/src/main/java/com/jointhegrid/udf/collect/GenericUDAFCollect.java

I was going to add it to hive but you can if you would like.
                
> 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