Trait vortex_array::compute::SearchSortedFn

source ·
pub trait SearchSortedFn<Array> {
    // Required method
    fn search_sorted(
        &self,
        array: &Array,
        value: &Scalar,
        side: SearchSortedSide,
    ) -> VortexResult<SearchResult>;

    // Provided method
    fn search_sorted_many(
        &self,
        array: &Array,
        values: &[Scalar],
        side: SearchSortedSide,
    ) -> VortexResult<Vec<SearchResult>> { ... }
}
Expand description

Searches for value assuming the array is sorted.

For nullable arrays we assume that the nulls are sorted last, i.e. they’re the greatest value

Required Methods§

source

fn search_sorted( &self, array: &Array, value: &Scalar, side: SearchSortedSide, ) -> VortexResult<SearchResult>

Provided Methods§

source

fn search_sorted_many( &self, array: &Array, values: &[Scalar], side: SearchSortedSide, ) -> VortexResult<Vec<SearchResult>>

Bulk search for many values.

Implementors§