v.1.1.54337New Feature

Added to Number OrNull Functions for Numeric Types

Added the to * Number* OrNull functions, where * Number* is a numeric type.
Added toNumberOrNull functions for all numeric types in ClickHouse, enabling safe conversion of values to nullable numeric types.

Why it matters

This feature was created to provide a convenient way to convert values to numeric types while returning NULL instead of throwing errors on invalid or non-convertible inputs. It improves query robustness by avoiding exceptions and allows handling of missing or corrupt data gracefully.

How to use it

Use the toNumberOrNull functions with the desired numeric type to safely convert input values. For example, toInt32OrNull(value) converts a value to Int32 or returns NULL if conversion fails.

Example:
SELECT toInt32OrNull('123') AS valid_int, toInt32OrNull('abc') AS invalid_int;

This will return 123 for the first and NULL for the second.