v.22.2Improvement

Allow parsing dictionary's PRIMARY KEY as PRIMARY KEY (id, value)

Allow to parse dictionary's PRIMARY KEY as PRIMARY KEY (id, value); previously supported only PRIMARY KEY id, value. Closes #34135. #34141 (Maksim Kita).
Support parsing dictionary's PRIMARY KEY definition using parentheses, e.g., PRIMARY KEY (id, value), instead of only allowing the syntax without parentheses.

Why it matters

Previously, dictionary definitions in ClickHouse only accepted PRIMARY KEY declarations without parentheses, which limited syntax flexibility and clarity. This feature improves dictionary schema definition parsing by allowing a more standard and explicit syntax for composite primary keys, making dictionary configurations more intuitive and easier to read.

How to use it

When defining a dictionary, use the PRIMARY KEY clause with parentheses around column names for composite keys, like this:

PRIMARY KEY (id, value)

This replaces the previous syntax that omitted parentheses.