v.19.8Improvements

Now If and Multiif Functions Do Not Rely on the Condition's Nullable, But Rely on the Branches for Sql Compatibility

Now if and multiIf functions do not rely on the condition's Nullable, but rely on the branches for sql compatibility. #5238 (Jian Wu)
The if and multiIf functions in ClickHouse are now designed to determine their nullability based on their branches rather than the condition expression, improving SQL compatibility.

Why it matters

Previously, the nullability of the if and multiIf functions depended on the condition's Nullable type, which could lead to inconsistencies with standard SQL behavior. This change aligns the functions' nullability logic with typical SQL semantics, ensuring more predictable and compatible results when handling nullable data.

How to use it

No special configuration is required. Existing queries using if and multiIf will automatically benefit from this improved nullability handling. Users can simply continue writing conditional expressions as usual.