pub trait MaskReduce: VTable {
const VALIDITY_IS_METADATA_ONLY: bool = false;
// Required method
fn mask(
array: ArrayView<'_, Self>,
mask: &ArrayRef,
) -> VortexResult<Option<ArrayRef>>;
}Expand description
Mask an array without reading buffers.
This trait is for mask implementations that can operate purely on array metadata and
structure without needing to read or execute on the underlying buffers. Implementations
should return None if masking requires buffer access.
The mask parameter is a boolean array where true=keep/valid, false=null-out.
§Preconditions
The mask has non-nullable Boolean dtype and the same length as the array. It may be lazy.
Provided Associated Constants§
Sourceconst VALIDITY_IS_METADATA_ONLY: bool = false
const VALIDITY_IS_METADATA_ONLY: bool = false
Whether reading this encoding’s validity requires only metadata access.
Enables lazy masks on all-valid inputs. Only opt in when array.validity() cannot read
buffers or execute children, including for nullable inputs.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".