You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Kostiantyn Kudriavtsev (JIRA)" <ji...@apache.org> on 2013/12/23 21:32:51 UTC

[jira] [Commented] (HIVE-4966) Introduce Collect_Map UDAF

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

Kostiantyn Kudriavtsev commented on HIVE-4966:
----------------------------------------------

Hello Harish, have you already implemented this UDF? Could you please provide patch?

> 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 was sent by Atlassian JIRA
(v6.1.5#6160)