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

Julian Hyde commented on CALCITE-2977:
--------------------------------------

I agree that the validator should check for this and should give a user error. 
If the field is not referenced I could go either way - allow it, or throw. But 
if it is referenced by the outer query, as in this case, it is definitely an 
error.

> Exception is not thrown  out when there are ambiguous field in select list
> --------------------------------------------------------------------------
>
>                 Key: CALCITE-2977
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2977
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.20.0
>            Reporter: pengzhiwei
>            Assignee: pengzhiwei
>            Priority: Major
>             Fix For: 1.20.0
>
>
> In the following sql:
> {code:java}
> select t0 from (select 1 as t0, 2 as t0 from dept){code}
> _SqlValidatorImpl_ does not  throw an exception for the ambiguous field "t0".
>  
>  



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

Reply via email to