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

Adolfo OchagavĂ­a commented on CALCITE-5067:
-------------------------------------------

Thanks for the suggestion, this is my first time working with Calcite and I am 
still finding my way around. The Babel parser worked out of the box. Is there 
any documentation about it? I would like to know if there are any noteworthy 
differences from the default parser, just to be sure I am not introducing 
unintended "features" with this change ;)

> 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