pub trait LayoutReader:
'static
+ Send
+ Sync {
// Required methods
fn name(&self) -> &Arc<str> ⓘ;
fn as_any(&self) -> &dyn Any;
fn dtype(&self) -> &DType;
fn row_count(&self) -> u64;
fn register_splits(
&self,
field_mask: &[FieldMask],
split_range: &SplitRange,
splits: &mut RowSplits,
) -> VortexResult<()>;
fn pruning_evaluation(
&self,
row_range: &Range<u64>,
expr: &Expression,
mask: Mask,
) -> VortexResult<MaskFuture>;
fn filter_evaluation(
&self,
row_range: &Range<u64>,
expr: &Expression,
mask: MaskFuture,
) -> VortexResult<MaskFuture>;
fn projection_evaluation(
&self,
row_range: &Range<u64>,
expr: &Expression,
mask: MaskFuture,
) -> VortexResult<ArrayFuture>;
}Expand description
Stateful reader for a crate::Layout.
A reader owns or references any state needed to evaluate many scan operations over the same
layout, such as child readers, decoded metadata, or segment caches. Scan planning calls
register_splits; execution calls pruning, filter, and projection
evaluation for each selected row range.
Required Methods§
Sourcefn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Returns this reader as Any for downcasting by specialized wrappers.
Sourcefn register_splits(
&self,
field_mask: &[FieldMask],
split_range: &SplitRange,
splits: &mut RowSplits,
) -> VortexResult<()>
fn register_splits( &self, field_mask: &[FieldMask], split_range: &SplitRange, splits: &mut RowSplits, ) -> VortexResult<()>
Register natural split boundaries for this reader.
field_mask contains the projected and filtered field paths needed by the scan.
Implementations should add root-coordinate split boundaries to splits, constrained to
split_range.
Sourcefn pruning_evaluation(
&self,
row_range: &Range<u64>,
expr: &Expression,
mask: Mask,
) -> VortexResult<MaskFuture>
fn pruning_evaluation( &self, row_range: &Range<u64>, expr: &Expression, mask: Mask, ) -> VortexResult<MaskFuture>
Returns a mask where all false values are proven to be false in the given expression.
The returned mask does not need to have been intersected with the input mask.
Sourcefn filter_evaluation(
&self,
row_range: &Range<u64>,
expr: &Expression,
mask: MaskFuture,
) -> VortexResult<MaskFuture>
fn filter_evaluation( &self, row_range: &Range<u64>, expr: &Expression, mask: MaskFuture, ) -> VortexResult<MaskFuture>
Refines the given mask, returning a mask equal in length to the input mask.
It is recommended to defer awaiting the input mask for as long as possible (ideally, after all I/O is complete). This allows other conjuncts the opportunity to refine the mask as much as possible before it is used.
§Post-conditions
The returned mask MUST have been intersected with the input mask.
Sourcefn projection_evaluation(
&self,
row_range: &Range<u64>,
expr: &Expression,
mask: MaskFuture,
) -> VortexResult<ArrayFuture>
fn projection_evaluation( &self, row_range: &Range<u64>, expr: &Expression, mask: MaskFuture, ) -> VortexResult<ArrayFuture>
Evaluates an expression against an array.
It is recommended to defer awaiting the input mask for as long as possible (ideally, after all I/O is complete). This allows other conjuncts the opportunity to refine the mask as much as possible before it is used.
§Post-conditions
The returned array MUST have length equal to the true count of the input mask.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".