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>
 

Reply via email to