You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Navis (JIRA)" <ji...@apache.org> on 2015/02/09 08:58:34 UTC

[jira] [Created] (HIVE-9618) Deduplicate RS keys for ptf/windowing

Navis created HIVE-9618:
---------------------------

             Summary: Deduplicate RS keys for ptf/windowing
                 Key: HIVE-9618
                 URL: https://issues.apache.org/jira/browse/HIVE-9618
             Project: Hive
          Issue Type: Improvement
          Components: PTF-Windowing
            Reporter: Navis
            Assignee: Navis
            Priority: Trivial


Currently, partition spec containing same column for partition-by and order-by makes duplicated key column for RS. For example, 
{noformat}
explain
select p_mfgr, p_name, p_size, 
rank() over (partition by p_mfgr order by p_name) as r, 
dense_rank() over (partition by p_mfgr order by p_name) as dr, 
sum(p_retailprice) over (partition by p_mfgr order by p_name rows between unbounded preceding and current row)  as s1
from noop(on noopwithmap(on noop(on part 
partition by p_mfgr 
order by p_mfgr, p_name
)))
{noformat}

"partition by p_mfgr order by p_mfgr, p_name" makes duplicated key columns like below
{noformat}
Reduce Output Operator
    key expressions: p_mfgr (type: string), p_mfgr (type: string), p_name (type: string)
    sort order: +++
    Map-reduce partition columns: p_mfgr (type: string)
    value expressions: p_size (type: int), p_retailprice (type: double)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)