Trait vortex_array::iter::Accessor

source ·
pub trait Accessor<T>: Send + Sync {
    // Required methods
    fn array_len(&self) -> usize;
    fn is_valid(&self, index: usize) -> bool;
    fn value_unchecked(&self, index: usize) -> T;
    fn array_validity(&self) -> Validity;

    // Provided methods
    fn batch_size(&self, start_idx: usize) -> usize { ... }
    fn decode_batch(&self, start_idx: usize) -> Vec<T> { ... }
}
Expand description

Define the basic behavior required for batched iterators

Required Methods§

source

fn array_len(&self) -> usize

source

fn is_valid(&self, index: usize) -> bool

source

fn value_unchecked(&self, index: usize) -> T

source

fn array_validity(&self) -> Validity

Provided Methods§

source

fn batch_size(&self, start_idx: usize) -> usize

source

fn decode_batch(&self, start_idx: usize) -> Vec<T>

Implementors§

source§

impl<T> Accessor<T> for ConstantArray
where T: Clone + TryFrom<Scalar, Error = VortexError>,

source§

impl<T: NativePType> Accessor<T> for PrimitiveArray