hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-21021) Scalar subquery with only aggregate in subquery (no group by) has unnecessary sq_count_check branch
Date Wed, 12 Dec 2018 02:11:00 GMT

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

Hive QA commented on HIVE-21021:
--------------------------------

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  0s{color} |
{color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  7m 57s{color}
| {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  4s{color} |
{color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 35s{color}
| {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  3m 47s{color} | {color:blue}
ql in master has 2311 extant Findbugs warnings. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 55s{color} |
{color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 23s{color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 59s{color} |
{color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 59s{color} | {color:green}
the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 35s{color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m  0s{color}
| {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  4m  1s{color} |
{color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 54s{color} |
{color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 13s{color}
| {color:green} The patch does not generate ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 22m 57s{color} | {color:black}
{color} |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03)
x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-15268/dev-support/hive-personality.sh
|
| git revision | master / b650083 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| modules | C: ql U: ql |
| Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-15268/yetus.txt |
| Powered by | Apache Yetus    http://yetus.apache.org |


This message was automatically generated.



> Scalar subquery with only aggregate in subquery (no group by) has unnecessary sq_count_check
branch
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-21021
>                 URL: https://issues.apache.org/jira/browse/HIVE-21021
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: Vineet Garg
>            Assignee: Vineet Garg
>            Priority: Major
>         Attachments: HIVE-21021.1.patch, HIVE-21021.2.patch, HIVE-21021.3.patch, HIVE-21021.4.patch
>
>
> {code:sql}
> CREATE TABLE `store_sales`(
>   `ss_sold_date_sk` int,
>   `ss_quantity` int,
>   `ss_list_price` decimal(7,2));
> CREATE TABLE `date_dim`(
>   `d_date_sk` int,
>   `d_year` int);
> explain cbo with avg_sales as
>  (select avg(quantity*list_price) average_sales
>   from (select ss_quantity quantity
>              ,ss_list_price list_price
>        from store_sales
>            ,date_dim
>        where ss_sold_date_sk = d_date_sk
>          and d_year between 1999 and 2001 ) x)
> select * from store_sales where ss_list_price > (select average_sales from avg_sales);
> {code}
> {noformat}
> CBO PLAN:
> HiveProject(ss_sold_date_sk=[$0], ss_quantity=[$1], ss_list_price=[$2])
>   HiveJoin(condition=[true], joinType=[inner], algorithm=[none], cost=[{2.0 rows, 0.0
cpu, 0.0 io}])
>     HiveJoin(condition=[>($2, $3)], joinType=[inner], algorithm=[none], cost=[{2.0
rows, 0.0 cpu, 0.0 io}])
>       HiveProject(ss_sold_date_sk=[$0], ss_quantity=[$1], ss_list_price=[$2])
>         HiveTableScan(table=[[sub, store_sales]], table:alias=[store_sales])
>       HiveProject($f0=[/($0, $1)])
>         HiveAggregate(group=[{}], agg#0=[sum($0)], agg#1=[count($0)])
>           HiveProject($f0=[*(CAST($1):DECIMAL(10, 0), $2)])
>             HiveJoin(condition=[=($0, $3)], joinType=[inner], algorithm=[none], cost=[{2.0
rows, 0.0 cpu, 0.0 io}])
>               HiveProject(ss_sold_date_sk=[$0], ss_quantity=[$1], ss_list_price=[$2])
>                 HiveFilter(condition=[IS NOT NULL($0)])
>                   HiveTableScan(table=[[sub, store_sales]], table:alias=[store_sales])
>               HiveProject(d_date_sk=[$0])
>                 HiveFilter(condition=[AND(BETWEEN(false, $1, 1999, 2001), IS NOT NULL($0))])
>                   HiveTableScan(table=[[sub, date_dim]], table:alias=[date_dim])
>     HiveProject(cnt=[$0])
>       HiveFilter(condition=[<=(sq_count_check($0), 1)])
>         HiveProject(cnt=[$0])
>           HiveAggregate(group=[{}], cnt=[COUNT()])
>             HiveProject
>               HiveProject($f0=[$0])
>                 HiveAggregate(group=[{}], agg#0=[count($0)])
>                   HiveJoin(condition=[=($0, $3)], joinType=[inner], algorithm=[none],
cost=[{2.0 rows, 0.0 cpu, 0.0 io}])
>                     HiveProject(ss_sold_date_sk=[$0], ss_quantity=[$1], ss_list_price=[$2])
>                       HiveFilter(condition=[IS NOT NULL($0)])
>                         HiveTableScan(table=[[sub, store_sales]], table:alias=[store_sales])
>                     HiveProject(d_date_sk=[$0])
>                       HiveFilter(condition=[AND(BETWEEN(false, $1, 1999, 2001), IS NOT
NULL($0))])
>                         HiveTableScan(table=[[sub, date_dim]], table:alias=[date_dim])
> {noformat}



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

Mime
View raw message