v.23.5New Feature

Allow CASE without ELSE and enhance transform function in ClickHouse

Allow the use of CASE without an ELSE branch and extended transform to deal with more types. Also fix some issues that made transform() return incorrect results when decimal types were mixed with other numeric types. #48300 (Salvatore Mesoraca). This closes #2655. This closes #9596. This closes #38666.
Allows the use of CASE expressions without requiring an ELSE branch and extends the transform function to support more data types, including fixes for decimal and numeric type handling.

Why it matters

This feature improves SQL query flexibility by enabling CASE expressions without an explicit ELSE branch, preventing errors or unexpected behavior when ELSE is omitted. Additionally, it enhances the transform function to correctly handle mixed numeric types, especially decimals, ensuring accurate results and broader applicability.

How to use it

Users can write CASE expressions without an ELSE branch as usual, relying on the default NULL result when no condition matches. For transform, simply use the function with supported new data types and mixed decimal/numeric arguments without any special configuration; the function now correctly processes these cases.