pub trait BindCtx {
// Required method
fn bind(
&mut self,
array: &ArrayRef,
selection: Option<&ArrayRef>,
) -> VortexResult<BatchKernelRef>;
}Expand description
Context for binding batch execution kernels.
By binding child arrays through this context, we can perform common subtree elimination and share canonicalized results across multiple kernels.
Required Methods§
Sourcefn bind(
&mut self,
array: &ArrayRef,
selection: Option<&ArrayRef>,
) -> VortexResult<BatchKernelRef>
fn bind( &mut self, array: &ArrayRef, selection: Option<&ArrayRef>, ) -> VortexResult<BatchKernelRef>
Bind the given array and optional selection to produce a batch kernel, possibly reusing previously bound results from this context.
Implementations§
Source§impl dyn BindCtx + '_
impl dyn BindCtx + '_
Sourcepub fn bind_selection(
&mut self,
mask_len: usize,
mask: Option<&ArrayRef>,
) -> VortexResult<MaskExecution>
pub fn bind_selection( &mut self, mask_len: usize, mask: Option<&ArrayRef>, ) -> VortexResult<MaskExecution>
Bind an optional selection mask into a MaskExecution.
The caller must provide a mask length to handle the case where no mask is provided.
Sourcepub fn bind_mask(&mut self, mask: &ArrayRef) -> VortexResult<MaskExecution>
pub fn bind_mask(&mut self, mask: &ArrayRef) -> VortexResult<MaskExecution>
Bind a non-nullable boolean array into a MaskExecution.
This binding will optimize for constant arrays or other array types that can be more
efficiently converted into a Mask.
Source§impl dyn BindCtx + '_
impl dyn BindCtx + '_
Sourcepub fn bind_validity(
&mut self,
validity: &Validity,
array_len: usize,
selection: Option<&ArrayRef>,
) -> VortexResult<MaskExecution>
pub fn bind_validity( &mut self, validity: &Validity, array_len: usize, selection: Option<&ArrayRef>, ) -> VortexResult<MaskExecution>
Bind a validity helper into a MaskExecution.