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

Vineet Garg commented on HIVE-20215:
------------------------------------

Also query such as {code:sql}explain select t.c1 from (select t11.c1, t12.c1 
from t1 as t11 inner join t1 as t12 on t11.c1=t12.c1) as t;{code}
compile successfully but it should throw an error since reference to t.c1 is 
ambiguous. 

> Hive unable to plan/compile query
> ---------------------------------
>
>                 Key: HIVE-20215
>                 URL: https://issues.apache.org/jira/browse/HIVE-20215
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>            Reporter: Vineet Garg
>            Assignee: Vineet Garg
>            Priority: Major
>
> *Reproducer*
> ======================
> {code:sql}
> >create table t1(c1 int)
> >explain select count(*) from (select c1, c1 from t1) subq
> {code}
> {noformat}
> FAILED: SemanticException [Error 10007]: Ambiguous column reference c1 in subq
> {noformat}



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

Reply via email to