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

Jesus Camacho Rodriguez updated CALCITE-1785:
---------------------------------------------
    Fix Version/s: 1.13.0

> aliases are being treated as keywords
> -------------------------------------
>
>                 Key: CALCITE-1785
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1785
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.12.0
>            Reporter: Tony Zhao
>            Assignee: Julian Hyde
>             Fix For: 1.13.0
>
>
> I tried both version 1.11.0 and 1.12.0, this is the scala code to reproduce 
> the bug
> {code}
> import org.apache.calcite.sql.parser.SqlParser
> val sqlStmt = """
> select distinct foo as bar,
> split_part(f.value, '-', -1) as state_code
> from sample_table a, table(flatten(a.location_slugs))
> """
> SqlParser.create(sqlStmt).parseQuery()
> {code}
> gives
> {code}
> org.apache.calcite.sql.parser.SqlParseException: Encountered ". value" at 
> line 3, column 13.
> {code}
> This fails because value is in the keyword list, but it is actually an alias 
> here and shouldn't be treated as a keyword.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to