pub enum Batch {
Lazy(LazyBatch),
FullyMaterialized(Columns),
}Expand description
A batch of rows that can be lazy (encoded) or materialized (decoded).
This enables operators to work with data in the most efficient form:
- Lazy batches keep data encoded, enabling filters without materialization
- Materialized batches have decoded columnar data ready for computation
Variants§
Lazy(LazyBatch)
Fully lazy batch - all data remains encoded
FullyMaterialized(Columns)
Fully materialized batch - all columns decoded
Implementations§
Source§impl Batch
impl Batch
Sourcepub fn fully_materialized(columns: Columns) -> Self
pub fn fully_materialized(columns: Columns) -> Self
Create a materialized batch
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Get the number of columns
Sourcepub fn into_columns(self) -> Columns
pub fn into_columns(self) -> Columns
Convert to fully materialized Columns
Sourcepub fn as_lazy_mut(&mut self) -> Option<&mut LazyBatch>
pub fn as_lazy_mut(&mut self) -> Option<&mut LazyBatch>
Try to get as mutable lazy batch reference
Sourcepub fn apply_filter(&mut self, filter: &BitVec) -> Result<()>
pub fn apply_filter(&mut self, filter: &BitVec) -> Result<()>
Apply a filter mask to the batch
For lazy batches: updates validity bitmap without materialization For materialized batches: filters columns
Sourcepub fn extract_by_indices(&self, indices: &[usize]) -> Batch
pub fn extract_by_indices(&self, indices: &[usize]) -> Batch
Extract rows by indices, creating a new batch
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Batch
impl RefUnwindSafe for Batch
impl Send for Batch
impl Sync for Batch
impl Unpin for Batch
impl UnsafeUnpin for Batch
impl UnwindSafe for Batch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more