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
A LayoutReader is used to read a crate::Layout in a way that can cache state across multiple
evaluation operations.
Required Methods§
fn as_any(&self) -> &dyn Any
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 the splits of this layout reader.
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".