v.22.5Experimental Feature
Improvement to Cast Semistructured Data Columns to Nullable Type
Improvement for semistructured data: Allow to cast columns of typeObject(...)toObject(Nullable(...)). #36564 (awakeljw).
Why it matters
This feature resolves the limitation where columns defined asObject(...) could not be directly cast to their nullable counterparts, Object(Nullable(...)). It enhances flexibility and ease of working with semistructured data by allowing safe casting that accounts for nullable fields, improving compatibility and data processing capabilities.How to use it
Users can perform casts in their SQL queries to convert columns of typeObject(...) to Object(Nullable(...)) directly using the CAST function. For example:SELECT CAST(column_name AS Object(Nullable(...))) FROM table_name;