v.22.1Improvement
Correct Prevention of Nullable Primary Keys in ClickHouse
Correctly prevent Nullable primary keys if necessary. This is for #32780. #33218 (Amos Bird).
Why it matters
This feature addresses the issue whereNullable columns were incorrectly allowed as primary keys. Preventing Nullable types in primary keys ensures data integrity and correct query execution, as primary keys must be non-nullable to guarantee uniqueness and indexing consistency.How to use it
This validation is applied automatically when defining a primary key in table schemas. Users should avoid declaringNullable columns as primary keys. If such a schema is attempted, ClickHouse will now correctly reject it, preventing invalid table configurations.