hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Created: (HIVE-482) Optimize Group By + Order By with the same keys for TPC-H 3.4.2
Date Tue, 12 May 2009 17:13:45 GMT
Optimize Group By + Order By with the same keys for TPC-H 3.4.2
---------------------------------------------------------------

                 Key: HIVE-482
                 URL: https://issues.apache.org/jira/browse/HIVE-482
             Project: Hadoop Hive
          Issue Type: Improvement
            Reporter: Zheng Shao


We should be able to merge the map-reduce jobs for group-by and order-by.

{code}
select
  l_returnflag,
  l_linestatus,
  sum(l_quantity) as sum_qty,
  sum(l_extendedprice) as sum_base_price,
  sum(l_extendedprice*(1-l_discount)) as sum_disc_price,
  sum(l_extendedprice*(1-l_discount)*(1+l_tax)) as sum_charge,
  avg(l_quantity) as avg_qty,
  avg(l_extendedprice) as avg_price,
  avg(l_discount) as avg_disc,
  count(*) as count_order
from
  lineitem
where
  l_shipdate <= date '1998-12-01' - interval '[DELTA]' day (3)
group by
  l_returnflag,
  l_linestatus
order by
  l_returnflag,
  l_linestatus;
{code}

http://www.tpc.org/tpch/spec/tpch2.8.0.pdf Section 3.4.2 Functional Query Definition


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message