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

Volodymyr Vysotskyi commented on CALCITE-2507:
----------------------------------------------

[~michaelmior], it was just an example of a query with several levels of schema 
nesting to show that Calcite allows it. And the same query, but with the alias 
will fail at the validation stage, not at the parsing one even with the 
proposed fix.

> Aliasing a star in select list should throw a parsing error. 
> -------------------------------------------------------------
>
>                 Key: CALCITE-2507
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2507
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Hanumath Rao Maduri
>            Assignee: Julian Hyde
>            Priority: Minor
>             Fix For: 1.18.0
>
>
> Currently aliasing a Star column is not throwing an exception in parser. 
> There is a TODO for a simple test case (in SqlParserTest.java) to throw an 
> error in parser phase itself. 
> Change the parser grammar so as to report an error in parsing phase itself. 
> {code:java}
> // TODO: should fail in parser
> @Test public void testStarAsFails() {
> sql("select * as x from emp")
> .ok("SELECT * AS `X`\n"
> + "FROM `EMP`");
> }
> {code}



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

Reply via email to