v.25.3New Feature
Support switching on explicit values
Non-constant CASE support for switching on explicit values. #77399 (Yarik Briukhovetskyi).
Why it matters
This feature allows users to writeCASE expressions that switch based on non-constant values rather than only constants. It enhances query flexibility by enabling dynamic conditional logic dependent on runtime data, improving expressiveness and control in SQL queries.How to use it
WriteCASE expressions in your SQL queries using non-constant expressions within the CASE statement. For example:SELECT
CASE some_column
WHEN dynamic_value THEN 'Result A'
ELSE 'Result B'
END
FROM table_nameNo special settings are required as the feature is available by default.