pub trait LayoutReader:
'static
+ Send
+ Sync {
// Required methods
fn name(&self) -> &Arc<str>;
fn dtype(&self) -> &DType;
fn row_count(&self) -> u64;
fn register_splits(
&self,
field_mask: &[FieldMask],
row_range: &Range<u64>,
splits: &mut BTreeSet<u64>,
) -> 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§
Sourcefn register_splits(
&self,
field_mask: &[FieldMask],
row_range: &Range<u64>,
splits: &mut BTreeSet<u64>,
) -> VortexResult<()>
fn register_splits( &self, field_mask: &[FieldMask], row_range: &Range<u64>, splits: &mut BTreeSet<u64>, ) -> 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.