pub enum DynCell {
Show 19 variants
Null,
Bool(bool),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
F32(f32),
F64(f64),
Str(String),
Bin(Vec<u8>),
Struct(Vec<Option<DynCell>>),
List(Vec<Option<DynCell>>),
FixedSizeList(Vec<Option<DynCell>>),
Map(Vec<(DynCell, Option<DynCell>)>),
Union {
type_id: i8,
value: Option<Box<DynCell>>,
},
}Expand description
A dynamic cell to be appended into a dynamic column builder.
Variants§
Null
Append a null to the target column.
Bool(bool)
Boolean value for DataType::Boolean.
I8(i8)
8-bit signed integer for DataType::Int8.
I16(i16)
16-bit signed integer for DataType::Int16.
I32(i32)
32-bit signed integer for DataType::Int32.
I64(i64)
64-bit signed integer for DataType::Int64.
U8(u8)
8-bit unsigned integer for DataType::UInt8.
U16(u16)
16-bit unsigned integer for DataType::UInt16.
U32(u32)
32-bit unsigned integer for DataType::UInt32.
U64(u64)
64-bit unsigned integer for DataType::UInt64.
F32(f32)
32-bit floating point for DataType::Float32.
F64(f64)
64-bit floating point for DataType::Float64.
Str(String)
UTF-8 string for DataType::Utf8 or DataType::LargeUtf8 (and their dictionary forms).
Bin(Vec<u8>)
Arbitrary bytes for DataType::Binary, DataType::LargeBinary, or
DataType::FixedSizeBinary(w) (length must equal w) and their dictionary forms.
Struct(Vec<Option<DynCell>>)
Struct cell with one entry per child field (same length as the struct’s fields).
Each child may be None (null) or a nested DynCell matching the child’s type.
List(Vec<Option<DynCell>>)
Variable-size list (used for both List and LargeList); items can be null.
The child element type must match the list’s item field.
FixedSizeList(Vec<Option<DynCell>>)
Fixed-size list; the number of items must match the list’s declared length.
Each item may be None (null) or a nested DynCell matching the child type.
Map(Vec<(DynCell, Option<DynCell>)>)
Map cell containing key/value entries. Keys must be non-null; values may be null depending on the schema’s value-field nullability.
Union
Union cell selects a variant by type_id and optionally carries a nested value.
Implementations§
Source§impl DynCell
impl DynCell
Sourcepub fn union_value(type_id: i8, value: DynCell) -> Self
pub fn union_value(type_id: i8, value: DynCell) -> Self
Construct a union cell with a nested value.
Sourcepub fn union_null(type_id: i8) -> Self
pub fn union_null(type_id: i8) -> Self
Construct a union cell that encodes a null for the given variant.
Source§impl DynCell
impl DynCell
Sourcepub fn as_ref(&self) -> Option<DynCellRef<'_>>
pub fn as_ref(&self) -> Option<DynCellRef<'_>>
Borrow this owned cell as a DynCellRef without cloning underlying buffers.
Container variants (Struct, List, FixedSizeList, Map, Union) are not supported
because their borrowed form requires array-backed views; in those cases this returns None.