pub enum ColumnData {
Float64(Arc<[f64]>),
Int64(Arc<[i64]>),
Bool(Arc<[bool]>),
Utf8(Vec<String>),
Timedelta64(Arc<[i64]>),
Datetime64(Arc<[i64]>),
Period(Arc<[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(Arc<[i64]>)
Datetime64(Arc<[i64]>)
Period(Arc<[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.