v.24.12Improvement

Support Dynamic Type in ifNull and coalesce Functions

Support Dynamic type in functions ifNull and coalesce. #72772 (Pavel Kruglov).
Support for the Dynamic data type in the ifNull and coalesce functions in ClickHouse.

Why it matters

This feature enables the ifNull and coalesce functions to handle columns or expressions of the Dynamic data type, allowing users to work seamlessly with nullable dynamic data structures and improve flexibility when managing JSON-like data.

How to use it

Users can directly use the ifNull and coalesce functions with Dynamic type arguments in their SQL queries without any additional configuration. Example usage:

SELECT ifNull(dynamic_column, '{}'::Dynamic) FROM table;
SELECT coalesce(dynamic_column1, dynamic_column2, '{}'::Dynamic) FROM table;