[ 
https://issues.apache.org/jira/browse/HIVE-18725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashutosh Chauhan updated HIVE-18725:
------------------------------------
    Status: Open  (was: Patch Available)

Failures *are* related. I ran one of failing test \{{stats_only_null.q}} and it 
failed with following stack trace which looks like is caused by this patch :

{code}

2018-04-07T10:04:00,063 ERROR [60f4562b-584b-4622-b1a5-77f37bf3ce31 main] 
parse.CalcitePlanner: CBO failed, skipping CBO.

org.apache.hadoop.hive.ql.parse.SemanticException: 
org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: Cannot 
add column to RR: null.b => _col4: int due to duplication, see previous warnings

        at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.rethrowCalciteException(CalcitePlanner.java:1307)
 ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1187)
 ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.getOptimizedAST(CalcitePlanner.java:1200)
 ~[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:427)
 [hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12032)
 [hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:306)
 [hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:287)
 [hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:635) 
[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1655) 
[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1602) 
[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1597) 
[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
 [hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:200) 
[hive-exec-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]

        at 
org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239) 
[hive-cli-3.0.0-SNAPSHOT.jar:?]

        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188) 
[hive-cli-3.0.0-SNAPSHOT.jar:?]

        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402) 
[hive-cli-3.0.0-SNAPSHOT.jar:?]

        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:335) 
[hive-cli-3.0.0-SNAPSHOT.jar:?]

        at org.apache.hadoop.

{code}

> Improve error handling for subqueries if there is wrong column reference
> ------------------------------------------------------------------------
>
>                 Key: HIVE-18725
>                 URL: https://issues.apache.org/jira/browse/HIVE-18725
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Planning
>            Reporter: Vineet Garg
>            Assignee: Igor Kryvenko
>            Priority: Major
>         Attachments: HIVE-18725.01.patch, HIVE-18725.02.patch, 
> HIVE-18725.03.patch, HIVE-18725.04.patch, HIVE-18725.05.patch
>
>
> If there is a column reference within subquery which doesn't exist Hive 
> throws misleading error message.
> e.g. 
> {code:sql}
> select * from table1 where table1.col1 IN (select col2 from table2 where 
> table2.col1=table1.non_existing_column) and table1.col1 IN (select 4);
> {code}
> The above query, assuming table1 doesn't have non_existing_column, will throw 
> following misleading error:
> {noformat}
> FAILED: SemanticException Line 0:-1 Unsupported SubQuery Expression 'col1': 
> Only 1 SubQuery expression is supported.
> {noformat}



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

Reply via email to