List keywords in documentation
gianm opened this issue · comments
It’s useful to list reserved keywords in the documentation, and to include something in the release notes when new reserved keywords are added. This is because when we add new reserved keywords, it becomes impossible to use those keywords as identifiers in queries unless they are quoted. This can break pre-existing queries that use unquoted identifiers.
Most of our reserved keywords are inherited from Calcite, which we can see here: https://calcite.apache.org/docs/reference.html#keywords
We also add a small number of our own, which are here: https://github.com/apache/druid/blob/master/sql/src/main/codegen/config.fmpp
The doc should recommend quoting all identifiers as a good practice for production queries.
I'm wondering if we can add sys.keywords
table for all keywords. It will be much easier for people to search and helps the frontend editor highlight keywords.