v.24.11Experimental Feature
Prevent Use of Variant/Dynamic Types in ORDER BY/GROUP BY/PARTITION BY/PRIMARY KEY by Default
Don't allow Variant/Dynamic types in ORDER BY/GROUP BY/PARTITION BY/PRIMARY KEY by default because it may lead to unexpected results. #69731 (Pavel Kruglov).
Why it matters
This change prevents issues caused by the use of Variant and Dynamic types in sorting, grouping, partitioning, and primary key definitions, which can produce unpredictable behavior or incorrect query outcomes. It improves query reliability and correctness when working with these flexible types.How to use it
Users do not need to enable anything as this restriction is applied by default. To avoid errors, ensure that columns used inORDER BY, GROUP BY, PARTITION BY, and PRIMARY KEY clauses do not have Variant or Dynamic data types.