diff --git a/docs/querying/sql.md b/docs/querying/sql.md index 056ea9119b6..c0241bef879 100644 --- a/docs/querying/sql.md +++ b/docs/querying/sql.md @@ -423,3 +423,16 @@ SELECT count(city) from druid.table where SCALAR_IN_ARRAY(city, ?) ``` sample java code using dynamic parameters is provided [here](../api-reference/sql-jdbc.md#dynamic-parameters). + +## Reserved keywords + +Druid SQL reserves certain keywords which are used in its query language. Apache Druid inherits all of the reserved keywords from [Apache Calcite](https://calcite.apache.org/docs/reference.html#keywords). In addition to these, the following reserved keywords are unique to Apache Druid: + +* **CLUSTERED** +* **PARTITIONED** + +To use the reserved keywords in queries, enclose them in double quotation marks. For example, the reserved keyword **PARTITIONED** can be used in a query if and only if it is correctly quoted: + +```sql +SELECT "PARTITIONED" from druid.table +``` \ No newline at end of file diff --git a/website/.spelling b/website/.spelling index 1ac39471571..3e9827e82be 100644 --- a/website/.spelling +++ b/website/.spelling @@ -324,6 +324,7 @@ deserializes downtimes druid druid–kubernetes-extensions +druid.table e.g. encodings endian