druid icon indicating copy to clipboard operation
druid copied to clipboard

List keywords in documentation

Open gianm opened this issue 1 year ago • 2 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.

gianm avatar May 14 '24 06:05 gianm

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.

FrankChen021 avatar May 20 '24 01:05 FrankChen021

I'm interested in writing something up for the docs that lists all the reserved keywords, where in the docs would that be best placed? Design?

hevansDev avatar Jun 27 '24 16:06 hevansDev

Had a good chat with @techdocsmith about how best to add this to the docs and working on it now :)

hevansDev avatar Aug 05 '24 17:08 hevansDev