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

Ruben Q L commented on CALCITE-5123:
------------------------------------

Correct, quoted identifiers do support starting with a digit (among other 
advantages, e.g. being able to use a SQL reserved word as identifier).

Would this be a viable solution in your case? If so, shall we consider closing 
the current ticket?

> Calcite errors on columns starting with a digit
> -----------------------------------------------
>
>                 Key: CALCITE-5123
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5123
>             Project: Calcite
>          Issue Type: Bug
>         Environment: Calcite 1.30.0 on Java 11. Ran the example PySpark using 
> Python 3.9 with Spark 3.1.2
>            Reporter: Laurens Versluis
>            Priority: Major
>         Attachments: image-2022-04-28-09-41-03-535.png
>
>
> Not sure if this is related solely to Spark:
>  
> Parsing the following query errors in Calcite:
> {code:java}
> public static void main(String[] args) throws SqlParseException {
>     String sqlQuery = "SELECT a AS 1a FROM FakeTable";
>     SqlParser.create(sqlQuery, 
> SparkSqlDialect.DEFAULT.configureParser(SqlParser.config())).parseQuery();
> } {code}
> {noformat}
> Exception in thread "main" org.apache.calcite.sql.parser.SqlParseException: 
> Encountered "1" at line 1, column 13.
> {noformat}
> However, Spark does accept such queries:
> !image-2022-04-28-09-41-03-535.png!



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to