[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-26 Thread Deepak Jaiswal (JIRA)


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

Deepak Jaiswal commented on HIVE-20187:
---

pushed to branch-3 as it is a correctness issue.

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: HIVE-20187.1.patch, HIVE-20187.2.patch, 
> HIVE-20187.3.patch, extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:
>  
> Per suggestion in bug# TEZ-3971, creating this case under Hive project.
>  
>  



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


[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-25 Thread Gunther Hagleitner (JIRA)


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

Gunther Hagleitner commented on HIVE-20187:
---

+1 LGTM.

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: HIVE-20187.1.patch, HIVE-20187.2.patch, 
> HIVE-20187.3.patch, extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:
>  
> Per suggestion in bug# TEZ-3971, creating this case under Hive project.
>  
>  



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


[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-25 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20187:




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

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

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

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

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: 12937125 - PreCommit-HIVE-Build

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: HIVE-20187.1.patch, HIVE-20187.2.patch, 
> HIVE-20187.3.patch, extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] 

[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-25 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20187:


| (/) *{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 
24s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
3s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
39s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m  
6s{color} | {color:blue} ql in master has 2309 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 
23s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
6s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
6s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
38s{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  
8s{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 
13s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 24m 12s{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-13468/dev-support/hive-personality.sh
 |
| git revision | master / e2142b2 |
| 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-13468/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: HIVE-20187.1.patch, HIVE-20187.2.patch, 
> HIVE-20187.3.patch, extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0

[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-24 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20187:




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

{color:red}ERROR:{color} -1 due to build exiting with an error

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

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Tests exited with: Exception: Patch URL 
https://issues.apache.org/jira/secure/attachment/12937082/HIVE-20187.2.patch 
was found in seen patch url's cache and a test was probably run already on it. 
Aborting...
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12937082 - PreCommit-HIVE-Build

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: HIVE-20187.1.patch, HIVE-20187.2.patch, 
> extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  

[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-24 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20187:




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

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

{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 14896 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[limit_pushdown]
 (batchId=175)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[offset_limit_ppd_optimizer]
 (batchId=175)
org.apache.hadoop.hive.cli.TestSparkCliDriver.testCliDriver[bucket_map_join_tez2]
 (batchId=114)
{noformat}

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

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: 3 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12937082 - PreCommit-HIVE-Build

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: HIVE-20187.1.patch, HIVE-20187.2.patch, 
> extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] 

[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-24 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20187:


| (/) *{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 
21s{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 
44s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  4m 
11s{color} | {color:blue} ql in master has 2309 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 
25s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
2s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
2s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
38s{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 
15s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
56s{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 27s{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-13455/dev-support/hive-personality.sh
 |
| git revision | master / b5578eb |
| 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-13455/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: HIVE-20187.1.patch, HIVE-20187.2.patch, 
> extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
> 

[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-24 Thread Deepak Jaiswal (JIRA)


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

Deepak Jaiswal commented on HIVE-20187:
---

[~hagleitn] can you please review?

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: HIVE-20187.1.patch, HIVE-20187.2.patch, 
> extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:
>  
> Per suggestion in bug# TEZ-3971, creating this case under Hive project.
>  
>  



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


[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-24 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20187:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12931831/extended_explain.txt

{color:red}ERROR:{color} -1 due to build exiting with an error

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

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Tests exited with: Exception: Patch URL 
https://issues.apache.org/jira/secure/attachment/12931831/extended_explain.txt 
was found in seen patch url's cache and a test was probably run already on it. 
Aborting...
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12931831 - PreCommit-HIVE-Build

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  

[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-24 Thread Hive QA (JIRA)


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

Hive QA commented on HIVE-20187:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12931831/extended_explain.txt

{color:red}ERROR:{color} -1 due to build exiting with an error

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

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Tests exited with: NonZeroExitCodeException
Command 'bash /data/hiveptest/working/scratch/source-prep.sh' failed with exit 
status 1 and output '+ date '+%Y-%m-%d %T.%3N'
2018-08-24 14:05:24.608
+ [[ -n /usr/lib/jvm/java-8-openjdk-amd64 ]]
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ export 
PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ 
PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
+ ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
+ export 'MAVEN_OPTS=-Xmx1g '
+ MAVEN_OPTS='-Xmx1g '
+ cd /data/hiveptest/working/
+ tee /data/hiveptest/logs/PreCommit-HIVE-Build-13443/source-prep.txt
+ [[ false == \t\r\u\e ]]
+ mkdir -p maven ivy
+ [[ git = \s\v\n ]]
+ [[ git = \g\i\t ]]
+ [[ -z master ]]
+ [[ -d apache-github-source-source ]]
+ [[ ! -d apache-github-source-source/.git ]]
+ [[ ! -d apache-github-source-source ]]
+ date '+%Y-%m-%d %T.%3N'
2018-08-24 14:05:24.611
+ cd apache-github-source-source
+ git fetch origin
+ git reset --hard HEAD
HEAD is now at 6a28265 HIVE-20450: Add replication test for LOAD command on 
ACID table (Sankar Hariappan, reviewed by Anishek Agarwal)
+ git clean -f -d
Removing standalone-metastore/metastore-server/src/gen/
+ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
+ git reset --hard origin/master
HEAD is now at 6a28265 HIVE-20450: Add replication test for LOAD command on 
ACID table (Sankar Hariappan, reviewed by Anishek Agarwal)
+ git merge --ff-only origin/master
Already up-to-date.
+ date '+%Y-%m-%d %T.%3N'
2018-08-24 14:05:25.748
+ rm -rf ../yetus_PreCommit-HIVE-Build-13443
+ mkdir ../yetus_PreCommit-HIVE-Build-13443
+ git gc
+ cp -R . ../yetus_PreCommit-HIVE-Build-13443
+ mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-13443/yetus
+ patchCommandPath=/data/hiveptest/working/scratch/smart-apply-patch.sh
+ patchFilePath=/data/hiveptest/working/scratch/build.patch
+ [[ -f /data/hiveptest/working/scratch/build.patch ]]
+ chmod +x /data/hiveptest/working/scratch/smart-apply-patch.sh
+ /data/hiveptest/working/scratch/smart-apply-patch.sh 
/data/hiveptest/working/scratch/build.patch
fatal: unrecognized input
fatal: unrecognized input
fatal: unrecognized input
The patch does not appear to apply with p0, p1, or p2
+ result=1
+ '[' 1 -ne 0 ']'
+ rm -rf yetus_PreCommit-HIVE-Build-13443
+ exit 1
'
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12931831 - PreCommit-HIVE-Build

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Deepak Jaiswal
>Priority: Blocker
> Attachments: extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex 

[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-23 Thread Deepak Jaiswal (JIRA)


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

Deepak Jaiswal commented on HIVE-20187:
---

Thanks for the initial investigation Jaume. I will look into this.

Reassigning it to myself.

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.0
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Jaume M
>Priority: Blocker
> Attachments: extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:
>  
> Per suggestion in bug# TEZ-3971, creating this case under Hive project.
>  
>  



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


[jira] [Commented] (HIVE-20187) Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is set to true

2018-08-23 Thread Jaume M (JIRA)


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

Jaume M commented on HIVE-20187:


This is returning the wrong results because 
[checkConvertJoinBucketMapJoin|https://github.com/apache/hive/blob/236a32c645a21b04ccaf7f18db5c6a5aa53586e8/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java#L713]
 is returning {{true}} when it should be returning {{false}} (since the join 
columns are not the bucket columns). Shouldn't a check happen inside there to 
verify this [~djaiswal], [~jdere] ?

> Incorrect query results in hive when hive.convert.join.bucket.mapjoin.tez is 
> set to true
> 
>
> Key: HIVE-20187
> URL: https://issues.apache.org/jira/browse/HIVE-20187
> Project: Hive
>  Issue Type: Bug
> Environment: Hive 3.0 and Tez 0.91
>Reporter: Karthik
>Assignee: Jaume M
>Priority: Major
> Attachments: extended_explain.txt
>
>
> When hive.convert.join.bucket.mapjoin.tez=true and bucketed column is in 
> select clause but not in where clause, hive is performing a bucket map join 
> and returning incorrect results. When the bucketed column is removed from 
> select clause or  hive.convert.join.bucket.mapjoin.tez=false, returned query 
> results are correct.
>  
> create table my_fact(AMT decimal(20,3),bucket_col string ,join_col string )
> PARTITIONED BY (FISCAL_YEAR string ,ACCOUNTING_PERIOD string )
>  CLUSTERED BY (bucket_col) INTO 10 
>  BUCKETS 
>  stored as ORC
>  ;
>  create table my_dim(join_col string,filter_col string) stored as orc;
> After populating and analyzing above tables, explain  plan looks as below 
> when  hive.convert.join.bucket.mapjoin.tez=TRUE:
>  
> explain  select T4.join_col as account1,my_fact.accounting_period
>  FROM my_fact JOIN my_dim T4 ON my_fact.join_col = T4.join_col
>  WHERE my_fact.fiscal_year = '2015'
>  AND T4.filter_col IN ( 'VAL1', 'VAL2' ) 
>  and my_fact.accounting_period in (10);
> Vertex dependency in root stage
>  Map 1 <- Map 2 (CUSTOM_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
> *BucketMapJoin*:true,Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
> <-Map 2 [CUSTOM_EDGE] vectorized, llap
>  MULTICAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  
> default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:["bucket_col","join_col"]
> [^extended_explain.txt] has more detailed plan.
> When  hive.convert.join.bucket.mapjoin.tez=false,  plan no longer has 
> bucketjoin and query results are correct.
> Vertex dependency in root stage
>  Map 1 <- Map 2 (BROADCAST_EDGE)
> Stage-0
>  Fetch Operator
>  limit:-1
>  Stage-1
>  Map 1 vectorized, llap
>  File Output Operator [FS_24]
>  Select Operator [SEL_23] (rows=15282589 width=291)
>  Output:["_col0","_col1","_col2"]
>  Map Join Operator [MAPJOIN_22] (rows=15282589 width=291)
>  Conds:SEL_21._col1=RS_19._col0(Inner),Output:["_col0","_col3","_col4"]
>  <-Map 2 [BROADCAST_EDGE] vectorized, llap
>  BROADCAST [RS_19]
>  PartitionCols:_col0
>  Select Operator [SEL_18] (rows=818 width=186)
>  Output:["_col0"]
>  Filter Operator [FIL_17] (rows=818 width=186)
>  predicate:((filter_col) IN ('VAL1', 'VAL2') and join_col is not null)
>  TableScan [TS_3] (rows=1635 width=186)
>  default@my_dim,t4,Tbl:COMPLETE,Col:NONE,Output:["join_col","filter_col"]
>  <-Select Operator [SEL_21] (rows=13893263 width=291)
>  Output:["_col0","_col1","_col3"]
>  Filter Operator [FIL_20] (rows=13893263 width=291)
>  predicate:join_col is not null
>  TableScan [TS_0] (rows=13893263 width=291)
>  default@my_fact,my_fact,Tbl:COMPLETE,Col:NONE,Output:
>  
> Per suggestion in bug# TEZ-3971, creating this case under Hive project.
>  
>  



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