Skip to main content

MaskKernel

Trait MaskKernel 

Source
pub trait MaskKernel: VTable {
    // Required method
    fn mask(
        array: &Self::Array,
        mask: &ArrayRef,
        ctx: &mut ExecutionCtx,
    ) -> VortexResult<Option<ArrayRef>>;
}
Expand description

Mask an array, potentially reading buffers.

Unlike MaskReduce, this trait is for mask implementations that may need to read and execute on the underlying buffers to produce the masked result.

The mask parameter is a boolean array where true=keep/valid, false=null-out.

§Preconditions

The mask is guaranteed to have the same length as the array. Trivial cases (AllValid, AllInvalid, NonNullable) are handled by the caller before dispatch.

Required Methods§

Source

fn mask( array: &Self::Array, mask: &ArrayRef, ctx: &mut ExecutionCtx, ) -> VortexResult<Option<ArrayRef>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§