[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17791864#comment-17791864 ] Chunhui Yang commented on HIVE-21660: - But I use Hive-2.3.9 and run with MapReduce not Tez,also face this question.Can I edit GenTezUtils.java to fix this bug? > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Fix For: 4.0.0-alpha-1 > > Attachments: HIVE-21660.1.patch, HIVE-21660.2.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17056299#comment-17056299 ] Ashutosh Chauhan commented on HIVE-21660: - +1 > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.2.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17056017#comment-17056017 ] Hive QA commented on HIVE-21660: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12996238/HIVE-21660.2.patch {color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified. {color:green}SUCCESS:{color} +1 due to 18094 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/21051/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/21051/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-21051/ 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: 12996238 - PreCommit-HIVE-Build > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.2.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17055972#comment-17055972 ] Hive QA commented on HIVE-21660: | (x) *{color:red}-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} 9m 3s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 0s{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} 3m 35s{color} | {color:blue} ql in master has 1532 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 53s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 20s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 57s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 57s{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} 3m 47s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 54s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} asflicense {color} | {color:red} 0m 14s{color} | {color:red} The patch generated 2 ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 23m 35s{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.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-21051/dev-support/hive-personality.sh | | git revision | master / b5de84a | | Default Java | 1.8.0_111 | | findbugs | v3.0.1 | | asflicense | http://104.198.109.242/logs//PreCommit-HIVE-Build-21051/yetus/patch-asflicense-problems.txt | | modules | C: ql U: ql | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-21051/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.2.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 |
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17053090#comment-17053090 ] Hive QA commented on HIVE-21660: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12967616/HIVE-21660.1.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), 18103 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestTezPerfConstraintsCliDriver.testCliDriver[cbo_query24] (batchId=306) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/20974/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/20974/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-20974/ 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: 12967616 - PreCommit-HIVE-Build > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17053064#comment-17053064 ] Hive QA commented on HIVE-21660: | (x) *{color:red}-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} 9m 18s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 4s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 42s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 3m 49s{color} | {color:blue} ql in master has 1531 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 54s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 28s{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} 3m 57s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 54s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} asflicense {color} | {color:red} 0m 14s{color} | {color:red} The patch generated 2 ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 24m 38s{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.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-20974/dev-support/hive-personality.sh | | git revision | master / 1fe0bd2 | | Default Java | 1.8.0_111 | | findbugs | v3.0.1 | | asflicense | http://104.198.109.242/logs//PreCommit-HIVE-Build-20974/yetus/patch-asflicense-problems.txt | | modules | C: ql U: ql | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-20974/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 |
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17052726#comment-17052726 ] Ganesha Shreedhara commented on HIVE-21660: --- [~jcamachorodriguez] It looks like I do not have permission to create PR. I have created RB req request ([https://reviews.apache.org/r/72203/]) . Please review. > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17052639#comment-17052639 ] Jesus Camacho Rodriguez commented on HIVE-21660: [~ganeshas], I will review it. Can you create a PR? Thanks > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17051996#comment-17051996 ] Ganesha Shreedhara commented on HIVE-21660: --- [~ashutoshc], [~jcamachorodriguez] Could you please review the patch? > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16843712#comment-16843712 ] Ganesha Shreedhara commented on HIVE-21660: --- Cc: [~hagleitn] [~pxiong] [~vgumashta] > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16833521#comment-16833521 ] Ganesha Shreedhara commented on HIVE-21660: --- Can someone please review the patch? Cc: [~ashutoshc] [~vihangk1] > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug > Components: Physical Optimizer >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16831548#comment-16831548 ] Hive QA commented on HIVE-21660: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12967616/HIVE-21660.1.patch {color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified. {color:green}SUCCESS:{color} +1 due to 15936 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/17091/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/17091/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-17091/ 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: 12967616 - PreCommit-HIVE-Build > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16831532#comment-16831532 ] Hive QA commented on HIVE-21660: | (/) *{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 45s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 8s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 41s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 4m 8s{color} | {color:blue} ql in master has 2253 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 30s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 10s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 10s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 41s{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 26s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 4s{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} 25m 17s{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.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-17091/dev-support/hive-personality.sh | | git revision | master / afdda58 | | 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-17091/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.1.patch, HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16830643#comment-16830643 ] Hive QA commented on HIVE-21660: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12967507/HIVE-21660.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 14 failed/errored test(s), 15935 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.metastore.TestObjectStore.catalogs (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testDatabaseOps (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testDeprecatedConfigIsOverwritten (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testDirectSQLDropParitionsCleanup (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testDirectSQLDropPartitionsCacheCrossSession (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testDirectSqlErrorMetrics (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testEmptyTrustStoreProps (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testMasterKeyOps (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testMaxEventResponse (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testPartitionOps (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testQueryCloseOnError (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testRoleOps (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testTableOps (batchId=231) org.apache.hadoop.hive.metastore.TestObjectStore.testUseSSLProperty (batchId=231) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/17086/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/17086/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-17086/ 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: 14 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12967507 - PreCommit-HIVE-Build > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16830606#comment-16830606 ] Hive QA commented on HIVE-21660: | (/) *{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} 9m 20s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 8s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 43s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 4m 19s{color} | {color:blue} ql in master has 2253 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 27s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 7s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 7s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 40s{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 33s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 1s{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} 26m 4s{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.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-17086/dev-support/hive-personality.sh | | git revision | master / ae82715 | | 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-17086/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second >
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16830427#comment-16830427 ] Hive QA commented on HIVE-21660: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12967499/HIVE-21660.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:green}SUCCESS:{color} +1 due to 15935 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/17083/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/17083/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-17083/ 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: 12967499 - PreCommit-HIVE-Build > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t2( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16830388#comment-16830388 ] Hive QA commented on HIVE-21660: | (x) *{color:red}-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 34s{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 36s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 3m 59s{color} | {color:blue} ql in master has 2253 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 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:red}-1{color} | {color:red} whitespace {color} | {color:red} 0m 0s{color} | {color:red} The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <>. Refer https://git-scm.com/docs/git-apply {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 4m 6s{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 7s{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.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-17083/dev-support/hive-personality.sh | | git revision | master / ae82715 | | Default Java | 1.8.0_111 | | findbugs | v3.0.0 | | whitespace | http://104.198.109.242/logs//PreCommit-HIVE-Build-17083/yetus/whitespace-eol.txt | | modules | C: ql U: ql | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-17083/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Ganesha Shreedhara >Priority: Major > Attachments: HIVE-21660.patch > > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t3( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16830195#comment-16830195 ] Ganesha Shreedhara commented on HIVE-21660: --- [~NavyaS] I think I got the issue. Let me submit the patch. > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Navya Sruthi Sunkarapalli >Priority: Major > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t3( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-21660) Wrong result when union all and later view with explode is used
[ https://issues.apache.org/jira/browse/HIVE-21660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16829632#comment-16829632 ] Navya Sruthi Sunkarapalli commented on HIVE-21660: -- Can you provide me with the data to solve this issue. > Wrong result when union all and later view with explode is used > --- > > Key: HIVE-21660 > URL: https://issues.apache.org/jira/browse/HIVE-21660 > Project: Hive > Issue Type: Bug >Affects Versions: 3.1.1 >Reporter: Ganesha Shreedhara >Assignee: Navya Sruthi Sunkarapalli >Priority: Major > > There is a data loss when the data is inserted to a partitioned table using > union all and lateral view with explode. > > *Steps to reproduce:* > > {code:java} > create table t1 (id int, dt string); > insert into t1 values (2, '2019-04-01'); > create table t3( id int, dates array); > insert into t2 select 1 as id, array('2019-01-01','2019-01-02','2019-01-03') > as dates; > create table dst (id int) partitioned by (dt string); > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.exec.dynamic.partition=true; > insert overwrite table dst partition (dt) > select t.id, t.dt from ( > select id, dt from t1 > union all > select id, dts as dt from t2 tt2 lateral view explode(tt2.dates) dd as dts ) > t; > select * from dst_hdfs; > {code} > > > *Actual Result:* > {code:java} > +--+--+ > | 2| 2019-04-01 | > +--+--+{code} > > *Expected Result* (Run only the select part from the above insert query)*:* > {code:java} > +---++ > | 2 | 2019-04-01 | > | 1 | 2019-01-01 | > | 1 | 2019-01-02 | > | 1 | 2019-01-03 | > +---++{code} > > Data retrieved using union all and lateral view with explode from second > table is missing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)