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

Julian Hyde commented on CALCITE-1241:
--------------------------------------

The list of reserved keywords doesn't change very often (because it comes down 
from the SQL standard). A common mistake is to add a keyword and forget to add 
it to the non-reserved list. Should we have a list of reserved words (in a 
test, say) and a test that will break (and require manual intervention) each 
time someone adds a reserved word (intentionally or otherwise).

We already have SqlParserTest.testGenerateKeyWords, which does something 
similar, but doesn't check for new reserved keywords explicitly. Plus it 
doesn't help projects that extend the core SQL parser, such as Drill and 
Phoenix.

> 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
>             Fix For: 1.8.0
>
>
> 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