Expand description
§Logical Operations Kernels Module - Boolean Logic and Set Operations
Logical operation kernels providing efficient boolean algebra, set membership testing, and range operations with SIMD acceleration and null-aware semantics. Critical foundation for query execution, filtering predicates, and analytical data processing workflows.
§Core Operations
- Boolean algebra: AND, OR, XOR, NOT operations on boolean arrays with bitmask optimisation
- Set membership: IN and NOT IN operations with hash-based lookup optimisation
- Range operations: BETWEEN predicates for numeric and string data types
- Pattern matching: String pattern matching with optimised prefix/suffix detection
- Null-aware logic: Three-valued logic implementation following SQL semantics
- Compound predicates: Efficient evaluation of complex multi-condition expressions
Constants§
- W8
- Auto-generated SIMD lane widths from build.rs
SIMD lane count for 8-bit elements (u8, i8).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W16
- SIMD lane count for 16-bit elements (u16, i16).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W32
- SIMD lane count for 32-bit elements (u32, i32, f32).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W64
- SIMD lane count for 64-bit elements (u64, i64, f64).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE.
Functions§
- apply_
logical_ bool - Logical AND/OR/XOR of two bit-packed boolean masks over a window. Offsets are bit offsets. Length is in bits. Panics if offsets are not 64-bit aligned.
- between_
array - Test if array elements fall between min/max bounds, dispatching by array type.
- between_
f32 - Test if LHS values fall between RHS min/max bounds, producing boolean result array.
- between_
f64 - Test if LHS values fall between RHS min/max bounds, producing boolean result array.
- between_
i32 - Test if LHS values fall between RHS min/max bounds, producing boolean result array.
- between_
i64 - Test if LHS values fall between RHS min/max bounds, producing boolean result array.
- between_
u32 - Test if LHS values fall between RHS min/max bounds, producing boolean result array.
- between_
u64 - Test if LHS values fall between RHS min/max bounds, producing boolean result array.
- cmp_
between - Test if values fall between min/max bounds for comparable numeric types.
- cmp_
between_ f - Test if floating-point values fall between bounds with NaN handling.
- cmp_
between_ mask - Mask-aware variant
- cmp_
dict_ between - Test if dictionary/categorical values fall between lexicographic bounds.
- cmp_
dict_ in - Returns
truefor each row inlhswhose string value also appears anywhere inrhs, respecting null masks on both sides. Returnstruefor each row inlhswhose string value also appears anywhere inrhs, respecting null masks on both sides. - cmp_in
- Test membership in set for hashable types using hash-based lookup.
- cmp_
in_ f - Test membership in set for floating-point types with NaN handling.
- cmp_
in_ f_ mask - SIMD-aware, type-specific dispatch for cmp_in_f_mask and cmp_in_f
- cmp_
in_ mask - Mask-aware variant
- cmp_
str_ between - Test if LHS string values fall lexicographically between RHS min/max bounds.
- cmp_
str_ in - Test membership of LHS string values in RHS string set.
- in_
array - Test membership of array elements in values set, dispatching by array type.
- in_f32
- Test membership of LHS floating-point values in RHS set with NaN handling.
- in_f64
- Test membership of LHS floating-point values in RHS set with NaN handling.
- in_i32
- Test membership of LHS integer values in RHS set, producing boolean result array.
- in_i64
- Test membership of LHS integer values in RHS set, producing boolean result array.
- in_u32
- Test membership of LHS integer values in RHS set, producing boolean result array.
- in_u64
- Test membership of LHS integer values in RHS set, producing boolean result array.
- is_
not_ null_ array - Generate boolean mask indicating non-null elements in any array type.
- is_
null_ array - Generate boolean mask indicating null elements in any array type.
- not_
bool - Bitwise NOT of a bit-packed boolean mask window. Offset is a bit offset; len is in bits. Requires offset % 64 == 0 for word-level SIMD processing.
- not_
in_ array - Test non-membership of array elements in values set, dispatching by array type.