Skip to main content

Module compare

Module compare 

Source
Expand description

Native comparison kernels.

execute_compare dispatches on the logical DType of its operands and evaluates every comparison directly over Vortex canonical arrays: bit buffers for booleans, RowFn for primitives, lane kernels from vortex-compute for decimals, binary views for strings/bytes, and a row-wise comparator for nested types. There is no Arrow fallback.

Floating-point values use the same total ordering as Scalar: negative NaNs sort below negative infinity, positive NaNs sort above positive infinity, and -0.0 < +0.0. Equality is bitwise, so signed zeros and distinct NaN payloads remain distinct.

Compare binds a CompareOperator to two operands. It can execute through encoding-specific kernels before reaching the native dispatcher. CompareExecuteAdaptor connects these execution paths to CompareKernel, which lets an encoding compare values without first converting them to canonical arrays.

Structs§

Compare
A comparison of two operands with a CompareOperator.
CompareExecuteAdaptor
Adaptor that bridges CompareKernel implementations to ExecuteParentKernel.

Traits§

CompareKernel
Trait for encoding-specific comparison kernels that operate in encoded space.

Functions§

build_row_comparator
Build a row comparator over two recursively canonical arrays of the same logical dtype (ignoring nullability). Null values order before all non-null values at every level.
scalar_cmp
Compares scalars with matching dtypes, ignoring nullability.

Type Aliases§

RowComparator
A row comparator: compares row i of the left operand against row j of the right operand. Compares row i of the left array with row j of the right array.