pub struct ColumnLowCardinality { /* private fields */ }Expand description
Column for LowCardinality type (dictionary encoding)
Stores unique values in a dictionary and uses indices to reference them, providing compression for columns with many repeated values.
Reference Implementation: See
clickhouse-cpp/clickhouse/columns/lowcardinality.cpp
Implementations§
Source§impl ColumnLowCardinality
impl ColumnLowCardinality
Sourcepub fn dictionary<T: Column + 'static>(&self) -> &T
pub fn dictionary<T: Column + 'static>(&self) -> &T
Sourcepub fn dictionary_mut<T: Column + 'static>(&mut self) -> &mut T
pub fn dictionary_mut<T: Column + 'static>(&mut self) -> &mut T
Sourcepub fn dictionary_ref(&self) -> ColumnRef
pub fn dictionary_ref(&self) -> ColumnRef
Get the dictionary column as a ColumnRef (Arc<dyn Column>)
Sourcepub fn dictionary_size(&self) -> usize
pub fn dictionary_size(&self) -> usize
Get the number of unique values in the dictionary
Sourcepub fn append_unsafe(&mut self, value: &ColumnValue) -> Result<()>
pub fn append_unsafe(&mut self, value: &ColumnValue) -> Result<()>
Append a value with hash-based deduplication (like C++ AppendUnsafe) This is the core method for adding values to LowCardinality columns
Sourcepub fn append_values<I>(&mut self, values: I) -> Result<()>where
I: IntoIterator<Item = ColumnValue>,
pub fn append_values<I>(&mut self, values: I) -> Result<()>where
I: IntoIterator<Item = ColumnValue>,
Bulk append values from an iterator with deduplication
Trait Implementations§
Source§impl Column for ColumnLowCardinality
impl Column for ColumnLowCardinality
Source§fn column_type(&self) -> &Type
fn column_type(&self) -> &Type
Get the type of this column
Source§fn append_column(&mut self, other: ColumnRef) -> Result<()>
fn append_column(&mut self, other: ColumnRef) -> Result<()>
Append another column’s data to this column
Source§fn load_prefix(&mut self, buffer: &mut &[u8], _rows: usize) -> Result<()>
fn load_prefix(&mut self, buffer: &mut &[u8], _rows: usize) -> Result<()>
Load column prefix from byte buffer (for types that need prefix data)
Default implementation is a no-op. Override for types like
LowCardinality. This matches C++ clickhouse-cpp’s LoadPrefix pattern.
Source§fn load_from_buffer(&mut self, buffer: &mut &[u8], rows: usize) -> Result<()>
fn load_from_buffer(&mut self, buffer: &mut &[u8], rows: usize) -> Result<()>
Load column data from byte buffer
Source§fn save_prefix(&self, buffer: &mut BytesMut) -> Result<()>
fn save_prefix(&self, buffer: &mut BytesMut) -> Result<()>
Save column prefix to byte buffer (for types that need prefix data)
Default implementation is a no-op. Override for types like
LowCardinality, Array with special nested types. This matches C++
clickhouse-cpp’s SavePrefix pattern.
Source§fn clone_empty(&self) -> ColumnRef
fn clone_empty(&self) -> ColumnRef
Create an empty clone of this column (same type, no data)
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to a mutable concrete column type
Auto Trait Implementations§
impl Freeze for ColumnLowCardinality
impl !RefUnwindSafe for ColumnLowCardinality
impl Send for ColumnLowCardinality
impl Sync for ColumnLowCardinality
impl Unpin for ColumnLowCardinality
impl !UnwindSafe for ColumnLowCardinality
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more