Function datafusion_common::bisect::find_bisect_point
source · pub fn find_bisect_point<F>(
item_columns: &[ArrayRef],
target: &[ScalarValue],
compare_fn: F,
low: usize,
high: usize
) -> Result<usize>where
F: Fn(&[ScalarValue], &[ScalarValue]) -> Result<bool>,
Expand description
This function searches for a tuple of target values among the given rows using the bisection algorithm.
The boolean-valued function compare_fn
specifies whether we bisect on the left (with return value false
),
or on the right (with return value true
) as we compare the target value with the current value as we iteratively
bisect the input.