You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Enrico Olivelli <eo...@gmail.com> on 2018/09/01 10:45:02 UTC

Re: Babel and Reserved keywords

Julian,
This is very interesting to me.

I had already tracked a feature request, with a very few reserved words to
unblock in Babel
https://issues.apache.org/jira/browse/CALCITE-2405

Enrico

Il giorno sab 1 set 2018 alle ore 01:19 Julian Hyde <jh...@apache.org> ha
scritto:

> As you may now, we have a ‘Babel’ SQL parser whose mission is to accept
> SQL of the widest possible set of SQL dialects.
>
> One of the things we can improve is to take reserved keywords and make
> them not reserved. They would then have a meaning if used in a specific
> context, but could otherwise be used as identifiers (table names, column
> names, aliases) without being quoted.
>
> I tried making “YEAR” non-reserved, and the experiment was successful.
> However I tried making everything non-reserved, adding all of the reserved
> keywords[1] to the non-reserved list in Babel[2]. But it didn’t work too
> well.
>
> Can anyone devise a way to figure out the minimal set of reserved keywords?
>
> Julian
>
> [1]
> https://github.com/apache/calcite/blob/master/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java#L94
> <
> https://github.com/apache/calcite/blob/master/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java#L94
> >
>
> [2]
> https://github.com/apache/calcite/blob/master/babel/src/main/codegen/config.fmpp#L32
> <
> https://github.com/apache/calcite/blob/master/babel/src/main/codegen/config.fmpp#L32>
>