You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Lefty Leverenz (JIRA)" <ji...@apache.org> on 2017/06/04 06:34:04 UTC
[jira] [Commented] (HIVE-16654) Optimize a combination of avg(),
sum(), count(distinct) etc
[ https://issues.apache.org/jira/browse/HIVE-16654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036185#comment-16036185 ]
Lefty Leverenz commented on HIVE-16654:
---------------------------------------
Doc note: This adds *hive.optimize.countdistinct* to HiveConf.java, so it needs to be documented in the wiki.
* [Configuration Properties -- Query and DDL Execution | https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-QueryandDDLExecution]
Added a TODOC3.0 label.
> Optimize a combination of avg(), sum(), count(distinct) etc
> -----------------------------------------------------------
>
> Key: HIVE-16654
> URL: https://issues.apache.org/jira/browse/HIVE-16654
> Project: Hive
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Pengcheng Xiong
> Assignee: Pengcheng Xiong
> Labels: TODOC3.0
> Fix For: 3.0.0
>
> Attachments: HIVE-16654.01.patch, HIVE-16654.02.patch, HIVE-16654.03.patch, HIVE-16654.04.patch
>
>
> an example rewrite for q28 of tpcds is
> {code}
> (select LP as B1_LP ,CNT as B1_CNT,CNTD as B1_CNTD
> from (select sum(xc0) / sum(xc1) as LP, sum(xc1) as CNT, count(1) as CNTD from (select sum(ss_list_price) as xc0, count(ss_list_price) as xc1 from store_sales where
> ss_list_price is not null and ss_quantity between 0 and 5
> and (ss_list_price between 11 and 11+10
> or ss_coupon_amt between 460 and 460+1000
> or ss_wholesale_cost between 14 and 14+20)
> group by ss_list_price) ss0) ss1) B1
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)