hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harish Butani (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-4966) Introduce Collect_Map UDAF
Date Thu, 01 Aug 2013 00:09:48 GMT

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

Harish Butani commented on HIVE-4966:
-------------------------------------

For my understanding, are you adding a new function collect_array or are you enhancing collect_set
to have a dedup=true/false option. 

The signatures of collect_map and collect_set/array are different. So we have to expose them
as separate fns.

But open to sharing a single implementation. Makes sense. What specifically do you have in
mind? 

                
> 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

Mime
View raw message