pub enum ColumnData {
Float64(Arc<[f64]>),
Int64(Arc<[i64]>),
Bool(Arc<[bool]>),
Utf8(Vec<String>),
Timedelta64(Vec<i64>),
Datetime64(Vec<i64>),
Period(Vec<i64>, PeriodFreq),
Interval(Vec<Interval>),
}Expand description
AG-10: Typed array representation for vectorized batch execution.
Stores column data as contiguous typed arrays rather than Vec<Scalar>.
Validity is tracked by ValidityMask; invalid positions hold unspecified
values in the typed array (callers must check validity before reading).
This eliminates per-element enum dispatch for arithmetic operations,
enabling SIMD auto-vectorization on &[f64] / &[i64] slices.
Variants§
Float64(Arc<[f64]>)
Int64(Arc<[i64]>)
Bool(Arc<[bool]>)
Utf8(Vec<String>)
Timedelta64(Vec<i64>)
Datetime64(Vec<i64>)
Period(Vec<i64>, PeriodFreq)
Period column: per-row ordinals plus the column-uniform frequency
(a pandas PeriodArray carries a single freq for the whole array).
i64::MIN ordinals are NaT.
Interval(Vec<Interval>)
Implementations§
Source§impl ColumnData
impl ColumnData
Sourcepub fn from_scalars(values: &[Scalar], dtype: DType) -> Self
pub fn from_scalars(values: &[Scalar], dtype: DType) -> Self
Materialize typed array from a Vec<Scalar> and its ValidityMask.
Invalid positions get a default sentinel (0 / 0.0 / false / “”).
The caller must pair this with the corresponding ValidityMask to
interpret which positions are actually valid.
Sourcepub fn to_scalars(&self, dtype: DType, validity: &ValidityMask) -> Vec<Scalar>
pub fn to_scalars(&self, dtype: DType, validity: &ValidityMask) -> Vec<Scalar>
Convert typed array back to Vec<Scalar>, respecting ValidityMask.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for ColumnData
impl Clone for ColumnData
Source§fn clone(&self) -> ColumnData
fn clone(&self) -> ColumnData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more