v.23.5Improvement

Allow Quoted Restricted Keywords as Aliases in ClickHouse

Allow restricted keywords like ARRAY as an alias if the alias is quoted. Closes #49324. #49360 (Nikolay Degterinsky).
Allows the use of restricted keywords such as ARRAY as column aliases when the alias is quoted.

Why it matters

In SQL queries within ClickHouse, certain keywords like ARRAY are reserved and cannot be used directly as aliases. This feature enables users to use these restricted keywords as aliases by quoting them, improving flexibility and compatibility with queries that require such naming.

How to use it

Simply quote the restricted keyword when using it as an alias in your SQL statement. For example:

SELECT some_column AS </span>ARRAY<span class="token punctuation"> FROM table