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

Venki Korukanti commented on CALCITE-1241:
------------------------------------------

This is the most common issue, I have seen. One other thing is I encounter is: 
if the first two keywords in a SQL construct are non-reserved keywords, parser 
goes down the expression parsing path (as part of {{OrderedQueryOrExpr}}). So 
any SQL construct need to have at least one reserved keyword in the first two 
tokens. Is it better to separate out query and expression parsing into two 
methods and move the expression parsing to last choice? Expression most likely 
is going to have identifiers. Having it in the beginning only causes non 
reserved keywords to be interpreted as identifiers.

> Add a freemarker variable for adding non reserved keywords to Parser.jj 
> template
> --------------------------------------------------------------------------------
>
>                 Key: CALCITE-1241
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1241
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Venki Korukanti
>            Assignee: Julian Hyde
>
> Currently Calcite parser allows customizing parser grammar for supporting new 
> Sql constructs (ex. {{SHOW TABLES}} or {{CREATE TABLE ... AS QUERY}}) through 
> freemarker template variables. There is a freemarker template variable to 
> allow new keywords, but all these keywords are added as reserved keywords 
> which are not allowed as identifiers unless escaped with {{`}} (or configured 
> casing character). 
> This JIRA is to add a freemarker template variable for adding non reserved 
> keywords list.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to