v.21.2New Features

Nested Data Type Enhancements with Support for Arbitrary Levels of Nesting and Subcolumns

Data type Nested now supports arbitrary levels of nesting. Introduced subcolumns of complex types, such as size0 in Array, null in Nullable, names of Tuple elements, which can be read without reading of whole column. #17310 (Anton Popov).
The Nested data type in ClickHouse now supports arbitrary levels of nesting and introduces subcolumns for complex types such as Array, Nullable, and Tuple.

Why it matters

This feature allows users to access and read specific subcolumns like size0 in Array, null in Nullable, and named elements of Tuple directly without reading the entire complex column. It improves query efficiency and flexibility when working with deeply nested or complex data structures.

How to use it

Users can leverage this feature by querying subcolumns of complex nested data types directly in their SQL statements, for example, selecting NestedColumn.size0 from an Array or accessing named elements of a Tuple. No special configuration is required; simply reference subcolumns as needed in queries.