Function deltalake::datafusion::common::utils::bisect

source ·
pub fn bisect<const SIDE: bool>(
    item_columns: &[Arc<dyn Array>],
    target: &[ScalarValue],
    sort_options: &[SortOptions]
) -> Result<usize, DataFusionError>
Expand description

This function searches for a tuple of given values (target) among the given rows (item_columns) using the bisection algorithm. It assumes that item_columns is sorted according to sort_options and returns the insertion index of target. Template argument SIDE being true/false means left/right insertion.