[jira] [Commented] (HIVE-20570) Union ALL with hive.optimize.union.remove=true has incorrect plan

2018-09-19 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20570:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12940326/HIVE-20570.3.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:green}SUCCESS:{color} +1 due to 14980 tests passed

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/13903/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/13903/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-13903/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12940326 - PreCommit-HIVE-Build

> Union ALL with hive.optimize.union.remove=true has incorrect plan
> -
>
> Key: HIVE-20570
> URL: https://issues.apache.org/jira/browse/HIVE-20570
> Project: Hive
>  Issue Type: Bug
>Reporter: Janaki Lahorani
>Assignee: Janaki Lahorani
>Priority: Major
> Attachments: HIVE-20570.1.patch, HIVE-20570.2.patch, 
> HIVE-20570.3.patch
>
>
> When hive.optimize.union.remove=true and a select query is run with group by, 
> the final fetch is waiting only for one of the branches and not both.
> Test Case:
> {code}
> create table if not exists test_table(column1 string, column2 int);
> insert into test_table values('a',1),('b',2);
> set hive.optimize.union.remove=true;
> set mapred.input.dir.recursive=true;
> explain
> select column1 from test_table group by column1
> union all
> select column1 from test_table group by column1;
> {code}
> In the below the two stages correspond to the two parts of union all.  But 
> the final fetch operator (Stage 0) only depends on one of the stages, but it 
> should depend on both.
> Plan:
> {code}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-2 is a root stage
>   *Stage-0 depends on stages: Stage-1*
> STAGE PLANS:
>   Stage: Stage-1
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Group By Operator
> keys: column1 (type: string)
> mode: hash
> outputColumnNames: _col0
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
> Reduce Output Operator
>   key expressions: _col0 (type: string)
>   sort order: +
>   Map-reduce partition columns: _col0 (type: string)
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Execution mode: vectorized
>   Reduce Operator Tree:
> Group By Operator
>   keys: KEY._col0 (type: string)
>   mode: mergepartial
>   outputColumnNames: _col0
>   Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
>   File Output Operator
> compressed: false
> Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
> table:
> input format: org.apache.hadoop.mapred.SequenceFileInputFormat
> output format: 
> org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
> serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
>   Stage: Stage-2
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Group By Operator
> keys: column1 (type: string)
> mode: hash
> outputColumnNames: _col0
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
> Reduce Output Operator
>   key expressions: _col0 (type: string)
>  

[jira] [Commented] (HIVE-20570) Union ALL with hive.optimize.union.remove=true has incorrect plan

2018-09-19 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20570:


| (/) *{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}  8m 
37s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
7s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
38s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m 
13s{color} | {color:blue} ql in master has 2326 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
1s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
29s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
39s{color} | {color:green} ql: The patch generated 0 new + 2 unchanged - 1 
fixed = 2 total (was 3) {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 
20s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
57s{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} 24m 49s{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-13903/dev-support/hive-personality.sh
 |
| git revision | master / 9c90776 |
| 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-13903/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Union ALL with hive.optimize.union.remove=true has incorrect plan
> -
>
> Key: HIVE-20570
> URL: https://issues.apache.org/jira/browse/HIVE-20570
> Project: Hive
>  Issue Type: Bug
>Reporter: Janaki Lahorani
>Assignee: Janaki Lahorani
>Priority: Major
> Attachments: HIVE-20570.1.patch, HIVE-20570.2.patch, 
> HIVE-20570.3.patch
>
>
> When hive.optimize.union.remove=true and a select query is run with group by, 
> the final fetch is waiting only for one of the branches and not both.
> Test Case:
> {code}
> create table if not exists test_table(column1 string, column2 int);
> insert into test_table values('a',1),('b',2);
> set hive.optimize.union.remove=true;
> set mapred.input.dir.recursive=true;
> explain
> select column1 from test_table group by column1
> union all
> select column1 from test_table group by column1;
> {code}
> In the below the two stages correspond to the two parts of union all.  But 
> the final fetch operator (Stage 0) only depends on one of the stages, but it 
> should depend on both.
> Plan:
> {code}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-2 is a root stage
>   *Stage-0 depends on stages: Stage-1*
> STAGE PLANS:
>   Stage: Stage-1
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColu

[jira] [Commented] (HIVE-20570) Union ALL with hive.optimize.union.remove=true has incorrect plan

2018-09-18 Thread Andrew Sherman (JIRA)


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

Andrew Sherman commented on HIVE-20570:
---

+1 LGTM pending test results

> Union ALL with hive.optimize.union.remove=true has incorrect plan
> -
>
> Key: HIVE-20570
> URL: https://issues.apache.org/jira/browse/HIVE-20570
> Project: Hive
>  Issue Type: Bug
>Reporter: Janaki Lahorani
>Assignee: Janaki Lahorani
>Priority: Major
> Attachments: HIVE-20570.1.patch, HIVE-20570.2.patch, 
> HIVE-20570.3.patch
>
>
> When hive.optimize.union.remove=true and a select query is run with group by, 
> the final fetch is waiting only for one of the branches and not both.
> Test Case:
> {code}
> create table if not exists test_table(column1 string, column2 int);
> insert into test_table values('a',1),('b',2);
> set hive.optimize.union.remove=true;
> set mapred.input.dir.recursive=true;
> explain
> select column1 from test_table group by column1
> union all
> select column1 from test_table group by column1;
> {code}
> In the below the two stages correspond to the two parts of union all.  But 
> the final fetch operator (Stage 0) only depends on one of the stages, but it 
> should depend on both.
> Plan:
> {code}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-2 is a root stage
>   *Stage-0 depends on stages: Stage-1*
> STAGE PLANS:
>   Stage: Stage-1
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Group By Operator
> keys: column1 (type: string)
> mode: hash
> outputColumnNames: _col0
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
> Reduce Output Operator
>   key expressions: _col0 (type: string)
>   sort order: +
>   Map-reduce partition columns: _col0 (type: string)
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Execution mode: vectorized
>   Reduce Operator Tree:
> Group By Operator
>   keys: KEY._col0 (type: string)
>   mode: mergepartial
>   outputColumnNames: _col0
>   Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
>   File Output Operator
> compressed: false
> Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
> table:
> input format: org.apache.hadoop.mapred.SequenceFileInputFormat
> output format: 
> org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
> serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
>   Stage: Stage-2
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Group By Operator
> keys: column1 (type: string)
> mode: hash
> outputColumnNames: _col0
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
> Reduce Output Operator
>   key expressions: _col0 (type: string)
>   sort order: +
>   Map-reduce partition columns: _col0 (type: string)
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Execution mode: vectorized
>   Reduce Operator Tree:
> Group By Operator
>   keys: KEY._col0 (type: string)
>   mode: mergepartial
>   outputColumnNames: _col0
>   Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
>   File Output Operator
> compressed: false
> Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
> table:
> input format: org.apache.hadoop.mapred.SequenceFileInputFormat
> output format: 
> org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
>   

[jira] [Commented] (HIVE-20570) Union ALL with hive.optimize.union.remove=true has incorrect plan

2018-09-18 Thread Janaki Lahorani (JIRA)


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

Janaki Lahorani commented on HIVE-20570:


The test failure is not related to this patch.

> Union ALL with hive.optimize.union.remove=true has incorrect plan
> -
>
> Key: HIVE-20570
> URL: https://issues.apache.org/jira/browse/HIVE-20570
> Project: Hive
>  Issue Type: Bug
>Reporter: Janaki Lahorani
>Assignee: Janaki Lahorani
>Priority: Major
> Attachments: HIVE-20570.1.patch, HIVE-20570.2.patch
>
>
> When hive.optimize.union.remove=true and a select query is run with group by, 
> the final fetch is waiting only for one of the branches and not both.
> Test Case:
> {code}
> create table if not exists test_table(column1 string, column2 int);
> insert into test_table values('a',1),('b',2);
> set hive.optimize.union.remove=true;
> set mapred.input.dir.recursive=true;
> explain
> select column1 from test_table group by column1
> union all
> select column1 from test_table group by column1;
> {code}
> In the below the two stages correspond to the two parts of union all.  But 
> the final fetch operator (Stage 0) only depends on one of the stages, but it 
> should depend on both.
> Plan:
> {code}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-2 is a root stage
>   *Stage-0 depends on stages: Stage-1*
> STAGE PLANS:
>   Stage: Stage-1
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Group By Operator
> keys: column1 (type: string)
> mode: hash
> outputColumnNames: _col0
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
> Reduce Output Operator
>   key expressions: _col0 (type: string)
>   sort order: +
>   Map-reduce partition columns: _col0 (type: string)
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Execution mode: vectorized
>   Reduce Operator Tree:
> Group By Operator
>   keys: KEY._col0 (type: string)
>   mode: mergepartial
>   outputColumnNames: _col0
>   Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
>   File Output Operator
> compressed: false
> Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
> table:
> input format: org.apache.hadoop.mapred.SequenceFileInputFormat
> output format: 
> org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
> serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
>   Stage: Stage-2
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Group By Operator
> keys: column1 (type: string)
> mode: hash
> outputColumnNames: _col0
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
> Reduce Output Operator
>   key expressions: _col0 (type: string)
>   sort order: +
>   Map-reduce partition columns: _col0 (type: string)
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Execution mode: vectorized
>   Reduce Operator Tree:
> Group By Operator
>   keys: KEY._col0 (type: string)
>   mode: mergepartial
>   outputColumnNames: _col0
>   Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
>   File Output Operator
> compressed: false
> Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
> table:
> input format: org.apache.hadoop.mapred.SequenceFileInputFormat
> output format: 
> org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
> s

[jira] [Commented] (HIVE-20570) Union ALL with hive.optimize.union.remove=true has incorrect plan

2018-09-18 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20570:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12940044/HIVE-20570.2.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 14977 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.ql.exec.spark.TestSparkSessionTimeout.testMultiSparkSessionTimeout
 (batchId=245)
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/13876/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/13876/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-13876/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 1 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12940044 - PreCommit-HIVE-Build

> Union ALL with hive.optimize.union.remove=true has incorrect plan
> -
>
> Key: HIVE-20570
> URL: https://issues.apache.org/jira/browse/HIVE-20570
> Project: Hive
>  Issue Type: Bug
>Reporter: Janaki Lahorani
>Assignee: Janaki Lahorani
>Priority: Major
> Attachments: HIVE-20570.1.patch, HIVE-20570.2.patch
>
>
> When hive.optimize.union.remove=true and a select query is run with group by, 
> the final fetch is waiting only for one of the branches and not both.
> Test Case:
> {code}
> create table if not exists test_table(column1 string, column2 int);
> insert into test_table values('a',1),('b',2);
> set hive.optimize.union.remove=true;
> set mapred.input.dir.recursive=true;
> explain
> select column1 from test_table group by column1
> union all
> select column1 from test_table group by column1;
> {code}
> In the below the two stages correspond to the two parts of union all.  But 
> the final fetch operator (Stage 0) only depends on one of the stages, but it 
> should depend on both.
> Plan:
> {code}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-2 is a root stage
>   *Stage-0 depends on stages: Stage-1*
> STAGE PLANS:
>   Stage: Stage-1
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Group By Operator
> keys: column1 (type: string)
> mode: hash
> outputColumnNames: _col0
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
> Reduce Output Operator
>   key expressions: _col0 (type: string)
>   sort order: +
>   Map-reduce partition columns: _col0 (type: string)
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Execution mode: vectorized
>   Reduce Operator Tree:
> Group By Operator
>   keys: KEY._col0 (type: string)
>   mode: mergepartial
>   outputColumnNames: _col0
>   Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
>   File Output Operator
> compressed: false
> Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column 
> stats: NONE
> table:
> input format: org.apache.hadoop.mapred.SequenceFileInputFormat
> output format: 
> org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
> serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
>   Stage: Stage-2
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE 
> Column stats: NONE
>   Group By Operator
> keys: column1 (type: string)
> mode: hash
> outputColumnNames: _col0
>   

[jira] [Commented] (HIVE-20570) Union ALL with hive.optimize.union.remove=true has incorrect plan

2018-09-18 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20570:


| (/) *{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}  8m 
37s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
7s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
38s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m  
0s{color} | {color:blue} ql in master has 2326 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
56s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
24s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
38s{color} | {color:green} ql: The patch generated 0 new + 2 unchanged - 1 
fixed = 2 total (was 3) {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 1s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  4m 
19s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
59s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
15s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 24m 29s{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-13876/dev-support/hive-personality.sh
 |
| git revision | master / 366eace |
| 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-13876/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Union ALL with hive.optimize.union.remove=true has incorrect plan
> -
>
> Key: HIVE-20570
> URL: https://issues.apache.org/jira/browse/HIVE-20570
> Project: Hive
>  Issue Type: Bug
>Reporter: Janaki Lahorani
>Assignee: Janaki Lahorani
>Priority: Major
> Attachments: HIVE-20570.1.patch, HIVE-20570.2.patch
>
>
> When hive.optimize.union.remove=true and a select query is run with group by, 
> the final fetch is waiting only for one of the branches and not both.
> Test Case:
> {code}
> create table if not exists test_table(column1 string, column2 int);
> insert into test_table values('a',1),('b',2);
> set hive.optimize.union.remove=true;
> set mapred.input.dir.recursive=true;
> explain
> select column1 from test_table group by column1
> union all
> select column1 from test_table group by column1;
> {code}
> In the below the two stages correspond to the two parts of union all.  But 
> the final fetch operator (Stage 0) only depends on one of the stages, but it 
> should depend on both.
> Plan:
> {code}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-2 is a root stage
>   *Stage-0 depends on stages: Stage-1*
> STAGE PLANS:
>   Stage: Stage-1
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
> 

[jira] [Commented] (HIVE-20570) Union ALL with hive.optimize.union.remove=true has incorrect plan

2018-09-16 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20570:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12939909/HIVE-20570.1.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 36 failed/errored test(s), 14967 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[skewjoin_union_remove_1] 
(batchId=92)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[skewjoin_union_remove_2] 
(batchId=30)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testACIDwithSchemaEvolutionAndCompaction
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testAcidWithSchemaEvolution
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testAlterTable
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testBucketCodec
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testBucketizedInputFormat
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testCleanerForTxnToWriteId
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testCompactWithDelete
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testDeleteIn
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testDynamicPartitionsMerge
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testDynamicPartitionsMerge2
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testETLSplitStrategyForACID
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testEmptyInTblproperties
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testFailHeartbeater
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testFileSystemUnCaching
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testInitiatorWithMultipleFailedCompactions
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testInsertOverwrite1
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testInsertOverwrite2
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testInsertOverwriteWithSelfJoin
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testMerge
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testMerge2
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testMerge3
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testMergeWithPredicate
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testMmTableCompaction
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testMultiInsert
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testMultiInsertStatement
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testNonAcidInsert
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testNonAcidToAcidConversion02
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testOpenTxnsCounter
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testOrcNoPPD
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testOrcPPD
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testOriginalFileReaderWhenNonAcidConvertedToAcid
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.testUpdateMixedCase
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.updateDeletePartitioned
 (batchId=311)
org.apache.hadoop.hive.ql.TestTxnCommands2WithSplitUpdateAndVectorization.writeBetweenWorkerAndCleaner
 (batchId=311)
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/13848/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/13848/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-13848/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Execu

[jira] [Commented] (HIVE-20570) Union ALL with hive.optimize.union.remove=true has incorrect plan

2018-09-16 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20570:


| (/) *{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}  8m 
27s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
6s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
40s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m  
3s{color} | {color:blue} ql in master has 2326 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
59s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
24s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
38s{color} | {color:green} ql: The patch generated 0 new + 1 unchanged - 2 
fixed = 1 total (was 3) {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 
11s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
0s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
14s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 24m 15s{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-13848/dev-support/hive-personality.sh
 |
| git revision | master / a37827e |
| 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-13848/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Union ALL with hive.optimize.union.remove=true has incorrect plan
> -
>
> Key: HIVE-20570
> URL: https://issues.apache.org/jira/browse/HIVE-20570
> Project: Hive
>  Issue Type: Bug
>Reporter: Janaki Lahorani
>Assignee: Janaki Lahorani
>Priority: Major
> Attachments: HIVE-20570.1.patch
>
>
> When hive.optimize.union.remove=true and a select query is run with group by, 
> the final fetch is waiting only for one of the branches and not both.
> Test Case:
> {code}
> create table if not exists test_table(column1 string, column2 int);
> insert into test_table values('a',1),('b',2);
> set hive.optimize.union.remove=true;
> set mapred.input.dir.recursive=true;
> explain
> select column1 from test_table group by column1
> union all
> select column1 from test_table group by column1;
> {code}
> In the below the two stages correspond to the two parts of union all.  But 
> the final fetch operator (Stage 0) only depends on one of the stages, but it 
> should depend on both.
> Plan:
> {code}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-2 is a root stage
>   *Stage-0 depends on stages: Stage-1*
> STAGE PLANS:
>   Stage: Stage-1
> Map Reduce
>   Map Operator Tree:
>   TableScan
> alias: test_table
> Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column 
> stats: NONE
> Select Operator
>   expressions: column1 (type: string)
>   outputColumnNames: column1
>   Statistics