Skip to main content

make_comparator

Function make_comparator 

pub fn make_comparator(
    left: &dyn Array,
    right: &dyn Array,
    opts: SortOptions,
) -> Result<Box<dyn Fn(usize, usize) -> Ordering + Send + Sync>, ArrowError>
Expand description

Returns a comparison function that compares two values at two arbitrary indices.

If nulls_first is true, null values are considered less than any non-null value; otherwise they are considered greater. This is primarily shared by crates that need repeated slot comparisons without constructing sliced arrays.