Some specifics would be useful. But in general, adding a new keyword (reserved or non-reserved) will require changes to the paser. Calcite allows (I won't say it makes it easy) for projects like Druid to create a derived parser by building a parser from the same parser template as Calcite's core parser but with different template variables.
If the keyword is non-reserved, there is an additional grammar rule that transforms the keyword token back into an identifier. It applies in all contexts except the one where the keyword is specifically needed by the grammar. For example, the non-reserved keyword BERNOULLI can only occur immediately after the keyword TABLESAMPLE. In a location that expects an identifier (e.g. after FROM), BERNOULLI will be converted into an identifier. Thus you can use BERNOULLI as a table name. Julian On Thu, Nov 4, 2021 at 2:18 PM Gian Merlino <g...@apache.org> wrote: > > Hey Druids, > > I'm looking into how to add keywords to Druid's SQL dialect, and I wanted > to ask if anyone has enough familiarity with Calcite to point at some info > about how to do that without needing to modify Calcite itself? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@druid.apache.org For additional commands, e-mail: dev-h...@druid.apache.org