pub struct ColumnArray { /* private fields */ }Expand description
Column for arrays of variable length
Stores a nested column with all array elements concatenated, and an offsets array that marks where each array ends.
Reference Implementation: See
clickhouse-cpp/clickhouse/columns/array.cpp
Implementations§
Source§impl ColumnArray
impl ColumnArray
Sourcepub fn with_nested(nested: ColumnRef) -> Self
pub fn with_nested(nested: ColumnRef) -> Self
Create a new array column with an existing nested column
Sourcepub fn with_capacity(type_: Type, capacity: usize) -> Self
pub fn with_capacity(type_: Type, capacity: usize) -> Self
Create with reserved capacity
Sourcepub fn append_len(&mut self, len: u64)
pub fn append_len(&mut self, len: u64)
Append an array (specified by the number of elements in the nested
column to consume) The caller must ensure that len elements have
been added to the nested column
Sourcepub fn get_array_range(&self, index: usize) -> Option<(usize, usize)>
pub fn get_array_range(&self, index: usize) -> Option<(usize, usize)>
Get the start and end indices for the array at the given index
Sourcepub fn get_array_len(&self, index: usize) -> Option<usize>
pub fn get_array_len(&self, index: usize) -> Option<usize>
Get the length of the array at the given index
Sourcepub fn nested_mut<T: Column + 'static>(&mut self) -> &mut T
pub fn nested_mut<T: Column + 'static>(&mut self) -> &mut T
Sourcepub fn nested_ref(&self) -> ColumnRef
pub fn nested_ref(&self) -> ColumnRef
Get the nested column as a ColumnRef (Arc<dyn Column>)
Sourcepub fn append_array(&mut self, array_data: ColumnRef)
pub fn append_array(&mut self, array_data: ColumnRef)
Append an entire array column as a single array element This takes all the data from the provided column and adds it as one array