[jira] [Commented] (HIVE-18724) Improve error handling for subqueries referencing columns(correlated) of its grand-parent query
[ https://issues.apache.org/jira/browse/HIVE-18724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16606068#comment-16606068 ] Igor Kryvenko commented on HIVE-18724: -- [~vgarg] Hi Vineet. This issue is already fixed in [HIVE-18725|https://issues.apache.org/jira/browse/HIVE-18725]. I think it would be useful to add .q test for this issue. What do you think about it? > Improve error handling for subqueries referencing columns(correlated) of its > grand-parent query > --- > > Key: HIVE-18724 > URL: https://issues.apache.org/jira/browse/HIVE-18724 > Project: Hive > Issue Type: Improvement > Components: Query Planning >Reporter: Vineet Garg >Priority: Major > > Currently Hive doesn't allow correlated subqueries which refer to columns of > grand parent query e.g. > {code:sql} > select t1.a from t t1 where t1.b IN (select t2.c from t t2 where t2.a IN > (select max(t3.b) from t t3, t t4 where t3.a=t2.a and t3.b=t1.b)) > {code} > In this example inner most query has column reference {{t3.b=t1.b}} where > {{t1.b}} references outer most query. > The error which Hive compiler throw is > {noformat} > FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'a': > Nested SubQuery expressions are not supported. > {noformat} > This is very misleading since Hive does support Nested subqueries. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-18724) Improve error handling for subqueries referencing columns(correlated) of its grand-parent query
[ https://issues.apache.org/jira/browse/HIVE-18724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16606083#comment-16606083 ] Vineet Garg commented on HIVE-18724: [~ikryvenko] That makes sense. Lets add test for this. > Improve error handling for subqueries referencing columns(correlated) of its > grand-parent query > --- > > Key: HIVE-18724 > URL: https://issues.apache.org/jira/browse/HIVE-18724 > Project: Hive > Issue Type: Improvement > Components: Query Planning >Reporter: Vineet Garg >Priority: Major > > Currently Hive doesn't allow correlated subqueries which refer to columns of > grand parent query e.g. > {code:sql} > select t1.a from t t1 where t1.b IN (select t2.c from t t2 where t2.a IN > (select max(t3.b) from t t3, t t4 where t3.a=t2.a and t3.b=t1.b)) > {code} > In this example inner most query has column reference {{t3.b=t1.b}} where > {{t1.b}} references outer most query. > The error which Hive compiler throw is > {noformat} > FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'a': > Nested SubQuery expressions are not supported. > {noformat} > This is very misleading since Hive does support Nested subqueries. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-18724) Improve error handling for subqueries referencing columns(correlated) of its grand-parent query
[ https://issues.apache.org/jira/browse/HIVE-18724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16606525#comment-16606525 ] Hive QA commented on HIVE-18724: | (/) *{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:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 40s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 1m 14s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Optional Tests | asflicense | | 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-13632/dev-support/hive-personality.sh | | git revision | master / 50d5bbb | | modules | C: ql U: ql | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-13632/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Improve error handling for subqueries referencing columns(correlated) of its > grand-parent query > --- > > Key: HIVE-18724 > URL: https://issues.apache.org/jira/browse/HIVE-18724 > Project: Hive > Issue Type: Improvement > Components: Query Planning >Reporter: Vineet Garg >Assignee: Igor Kryvenko >Priority: Major > Attachments: HIVE-18724.01.patch > > > Currently Hive doesn't allow correlated subqueries which refer to columns of > grand parent query e.g. > {code:sql} > select t1.a from t t1 where t1.b IN (select t2.c from t t2 where t2.a IN > (select max(t3.b) from t t3, t t4 where t3.a=t2.a and t3.b=t1.b)) > {code} > In this example inner most query has column reference {{t3.b=t1.b}} where > {{t1.b}} references outer most query. > The error which Hive compiler throw is > {noformat} > FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'a': > Nested SubQuery expressions are not supported. > {noformat} > This is very misleading since Hive does support Nested subqueries. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-18724) Improve error handling for subqueries referencing columns(correlated) of its grand-parent query
[ https://issues.apache.org/jira/browse/HIVE-18724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16606563#comment-16606563 ] Hive QA commented on HIVE-18724: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12938685/HIVE-18724.01.patch {color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 14929 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[allcolref_in_udf] (batchId=56) org.apache.hive.service.auth.TestCustomAuthentication.org.apache.hive.service.auth.TestCustomAuthentication (batchId=247) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/13632/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/13632/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-13632/ 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: 2 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12938685 - PreCommit-HIVE-Build > Improve error handling for subqueries referencing columns(correlated) of its > grand-parent query > --- > > Key: HIVE-18724 > URL: https://issues.apache.org/jira/browse/HIVE-18724 > Project: Hive > Issue Type: Improvement > Components: Query Planning >Reporter: Vineet Garg >Assignee: Igor Kryvenko >Priority: Major > Attachments: HIVE-18724.01.patch > > > Currently Hive doesn't allow correlated subqueries which refer to columns of > grand parent query e.g. > {code:sql} > select t1.a from t t1 where t1.b IN (select t2.c from t t2 where t2.a IN > (select max(t3.b) from t t3, t t4 where t3.a=t2.a and t3.b=t1.b)) > {code} > In this example inner most query has column reference {{t3.b=t1.b}} where > {{t1.b}} references outer most query. > The error which Hive compiler throw is > {noformat} > FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'a': > Nested SubQuery expressions are not supported. > {noformat} > This is very misleading since Hive does support Nested subqueries. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-18724) Improve error handling for subqueries referencing columns(correlated) of its grand-parent query
[ https://issues.apache.org/jira/browse/HIVE-18724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607608#comment-16607608 ] Hive QA commented on HIVE-18724: | (/) *{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:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 42s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 1m 22s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Optional Tests | asflicense | | 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-13650/dev-support/hive-personality.sh | | git revision | master / b1a917c | | modules | C: ql U: ql | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-13650/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Improve error handling for subqueries referencing columns(correlated) of its > grand-parent query > --- > > Key: HIVE-18724 > URL: https://issues.apache.org/jira/browse/HIVE-18724 > Project: Hive > Issue Type: Improvement > Components: Query Planning >Reporter: Vineet Garg >Assignee: Igor Kryvenko >Priority: Major > Attachments: HIVE-18724.01.patch, HIVE-18724.02.patch > > > Currently Hive doesn't allow correlated subqueries which refer to columns of > grand parent query e.g. > {code:sql} > select t1.a from t t1 where t1.b IN (select t2.c from t t2 where t2.a IN > (select max(t3.b) from t t3, t t4 where t3.a=t2.a and t3.b=t1.b)) > {code} > In this example inner most query has column reference {{t3.b=t1.b}} where > {{t1.b}} references outer most query. > The error which Hive compiler throw is > {noformat} > FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'a': > Nested SubQuery expressions are not supported. > {noformat} > This is very misleading since Hive does support Nested subqueries. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-18724) Improve error handling for subqueries referencing columns(correlated) of its grand-parent query
[ https://issues.apache.org/jira/browse/HIVE-18724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607667#comment-16607667 ] Hive QA commented on HIVE-18724: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12938807/HIVE-18724.02.patch {color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified. {color:green}SUCCESS:{color} +1 due to 14931 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/13650/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/13650/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-13650/ 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: 12938807 - PreCommit-HIVE-Build > Improve error handling for subqueries referencing columns(correlated) of its > grand-parent query > --- > > Key: HIVE-18724 > URL: https://issues.apache.org/jira/browse/HIVE-18724 > Project: Hive > Issue Type: Improvement > Components: Query Planning >Reporter: Vineet Garg >Assignee: Igor Kryvenko >Priority: Major > Attachments: HIVE-18724.01.patch, HIVE-18724.02.patch > > > Currently Hive doesn't allow correlated subqueries which refer to columns of > grand parent query e.g. > {code:sql} > select t1.a from t t1 where t1.b IN (select t2.c from t t2 where t2.a IN > (select max(t3.b) from t t3, t t4 where t3.a=t2.a and t3.b=t1.b)) > {code} > In this example inner most query has column reference {{t3.b=t1.b}} where > {{t1.b}} references outer most query. > The error which Hive compiler throw is > {noformat} > FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'a': > Nested SubQuery expressions are not supported. > {noformat} > This is very misleading since Hive does support Nested subqueries. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-18724) Improve error handling for subqueries referencing columns(correlated) of its grand-parent query
[ https://issues.apache.org/jira/browse/HIVE-18724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608005#comment-16608005 ] Igor Kryvenko commented on HIVE-18724: -- [~vgarg] Hi Vineet. Could you review, please? Thanks, Ihor. > Improve error handling for subqueries referencing columns(correlated) of its > grand-parent query > --- > > Key: HIVE-18724 > URL: https://issues.apache.org/jira/browse/HIVE-18724 > Project: Hive > Issue Type: Improvement > Components: Query Planning >Reporter: Vineet Garg >Assignee: Igor Kryvenko >Priority: Major > Attachments: HIVE-18724.01.patch, HIVE-18724.02.patch > > > Currently Hive doesn't allow correlated subqueries which refer to columns of > grand parent query e.g. > {code:sql} > select t1.a from t t1 where t1.b IN (select t2.c from t t2 where t2.a IN > (select max(t3.b) from t t3, t t4 where t3.a=t2.a and t3.b=t1.b)) > {code} > In this example inner most query has column reference {{t3.b=t1.b}} where > {{t1.b}} references outer most query. > The error which Hive compiler throw is > {noformat} > FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'a': > Nested SubQuery expressions are not supported. > {noformat} > This is very misleading since Hive does support Nested subqueries. -- This message was sent by Atlassian JIRA (v7.6.3#76005)