pub struct ColumnNullable { /* private fields */ }Expand description
Column for nullable values
Stores a nested column and a ColumnUInt8 for null flags (1 = null, 0 = not null).
Wire Format:
[null_bitmap: UInt8 * num_rows][nested_column_data]ClickHouse Reference:
Implementations§
Source§impl ColumnNullable
impl ColumnNullable
Sourcepub fn with_nested(nested: ColumnRef) -> Self
pub fn with_nested(nested: ColumnRef) -> Self
Create a new nullable column wrapping an existing nested column
Sourcepub fn from_parts(nested: ColumnRef, nulls: ColumnRef) -> Result<Self>
pub fn from_parts(nested: ColumnRef, nulls: ColumnRef) -> Result<Self>
Create with both nested and nulls columns
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_null(&mut self)
pub fn append_null(&mut self)
Append a null value
Sourcepub fn append_non_null(&mut self)
pub fn append_non_null(&mut self)
Append a non-null value (the nested column should be updated separately)
Sourcepub fn is_null(&self, index: usize) -> bool
pub fn is_null(&self, index: usize) -> bool
Check if value at index is null (matches C++ IsNull)
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 nested_ref_mut(&mut self) -> &mut ColumnRef
pub fn nested_ref_mut(&mut self) -> &mut ColumnRef
Get mutable access to the nested ColumnRef for dynamic dispatch scenarios
This is useful when you need to modify the nested column but don’t know its concrete type at compile time.
Sourcepub fn append_nullable(&mut self, value: Option<u32>)
pub fn append_nullable(&mut self, value: Option<u32>)
Append a nullable UInt32 value (convenience method for tests)
Sourcepub fn is_null_at(&self, index: usize) -> bool
pub fn is_null_at(&self, index: usize) -> bool
Check if value at index is null (alias for is_null)