v.24.9Experimental Feature
Improve castOrDefault for Non-Convertible Inner Types in Variant/Dynamic Columns
Improve castOrDefault from Variant/Dynamic columns so it works when inner types are not convertible at all. #67150 (Kruglov Pavel).
Why it matters
This enhancement resolves issues when usingcastOrDefault on Variant or Dynamic columns whose inner data types cannot be converted to the target type. It provides more robust and predictable casting behavior by returning the default value instead of failing or producing errors.How to use it
Use thecastOrDefault function as usual on Variant or Dynamic columns. The improved behavior is automatic and requires no additional configuration; it safely returns a default value if the inner type conversion is not possible.