Function datafusion::common::utils::search_in_slice
source · pub fn search_in_slice<F>(
item_columns: &[Arc<dyn Array>],
target: &[ScalarValue],
compare_fn: F,
low: usize,
high: usize
) -> Result<usize, DataFusionError>where
F: Fn(&[ScalarValue], &[ScalarValue]) -> Result<bool, DataFusionError>,
Expand description
This function searches for a tuple of given values (target
) among a slice of
the given rows (item_columns
) via a linear scan. The slice starts at the index
low
and ends at the index high
. The boolean-valued function compare_fn
specifies the stopping criterion.