v.1.1.54362New Feature

Nullable Type Casting to Non-Nullable When Not NULL

A Nullable type can be CAST to a non-Nullable type if the argument is not NULL.
Support casting from a Nullable type to a non-Nullable type in ClickHouse when the value is not NULL.

Why it matters

This feature allows seamless conversion of Nullable types to their corresponding non-Nullable types during CAST operations, provided the value is not NULL. It simplifies data transformations by avoiding errors or additional checks when safely removing nullability from columns or expressions.

How to use it

Simply apply a CAST operation from a Nullable type to the desired non-Nullable type. The operation will succeed if the argument is not NULL. For example:

SELECT CAST(nullable_column AS <non-nullable_type>) FROM table WHERE nullable_column IS NOT NULL