[ 
https://issues.apache.org/jira/browse/HIVEMALL-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Makoto Yui updated HIVEMALL-223:
--------------------------------
    Description: 
to_ordered_list UDAF to_ordered_list(value, key, '-k 100') or 
to_ordered_list(key, '-k 100') and returns List<key> using top-k values.

Sometime users want to get Map<key, score> or Map<score, key> for it's return.

So, this PR support `-kv_map` option that returns Map<K, V> and `-vk_map` 
option that returns Map<V,K> for the given to_ordered_list(value, key, '-k 
100').

  was:
to_order_map UDAF takes to_order_map(key, value, '-k 100') and returns Map<key, 
value> using top-k keys.

Sometime users want to get Map<key, score> instead of Map<score, key> for 
to_ordered_map(score, key).



So, add '-flip_kv' option as follows:

to_ordered_map(score, key, '-k 100 -flip_kv') to return Map<key, score> using 
top-100 scores.


> Add `-kv_map` and `-vk_map` option to to_ordered_list UDAF
> ----------------------------------------------------------
>
>                 Key: HIVEMALL-223
>                 URL: https://issues.apache.org/jira/browse/HIVEMALL-223
>             Project: Hivemall
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Makoto Yui
>            Assignee: Makoto Yui
>            Priority: Minor
>             Fix For: 0.5.2
>
>
> to_ordered_list UDAF to_ordered_list(value, key, '-k 100') or 
> to_ordered_list(key, '-k 100') and returns List<key> using top-k values.
> Sometime users want to get Map<key, score> or Map<score, key> for it's return.
> So, this PR support `-kv_map` option that returns Map<K, V> and `-vk_map` 
> option that returns Map<V,K> for the given to_ordered_list(value, key, '-k 
> 100').



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to