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

Julian Hyde commented on CALCITE-5067:
--------------------------------------

Have you tried using the Babel parser? It has fewer reserved keywords.

> Support using "LANGUAGE" as a variable name (like MySQL)
> --------------------------------------------------------
>
>                 Key: CALCITE-5067
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5067
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Adolfo OchagavĂ­a
>            Priority: Minor
>
> In MySQL it is possible to use "LANGUAGE" as a variable name. The example 
> below shows the difference between language (treated as a variable) and other 
> keywords (which raise a syntax error):
> {code:java}
> mysql> SELECT LANGUAGE;
> ERROR 1054 (42S22): Unknown column 'LANGUAGE' in 'field list'
> mysql> SELECT ALTER;
> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual 
> that corresponds to your MySQL server version for the right syntax to use 
> near 'ALTER' at line 1{code}
> In other words, it would be great if the following code succeeded instead of 
> throwing an exception:
> {code:java}
> var config = SqlParser.config().withLex(Lex.MYSQL);
> var parser = SqlParser.create("SELECT foo", config);
> var node = parser.parseQuery();{code}
> See, for context, [this 
> thread|https://lists.apache.org/thread/lnln25csnbs9yqlskjq2pnqx3f1rdfw5].



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to