Struct arrow::compute::kernels::sort::LexicographicalComparator
pub struct LexicographicalComparator {
compare_items: Vec<Box<dyn Fn(usize, usize) -> Ordering + Sync + Send>>,
}
Expand description
A lexicographical comparator that wraps given array data (columns) and can lexicographically compare data at given two indices. The lifetime is the same at the data wrapped.
Fields§
§compare_items: Vec<Box<dyn Fn(usize, usize) -> Ordering + Sync + Send>>
Implementations§
§impl LexicographicalComparator
impl LexicographicalComparator
pub fn compare(&self, a_idx: usize, b_idx: usize) -> Ordering
pub fn compare(&self, a_idx: usize, b_idx: usize) -> Ordering
lexicographically compare values at the wrapped columns with given indices.
pub fn try_new(
columns: &[SortColumn],
) -> Result<LexicographicalComparator, ArrowError>
pub fn try_new( columns: &[SortColumn], ) -> Result<LexicographicalComparator, ArrowError>
Create a new lex comparator that will wrap the given sort columns and give comparison results with two indices.
Auto Trait Implementations§
impl Freeze for LexicographicalComparator
impl !RefUnwindSafe for LexicographicalComparator
impl Send for LexicographicalComparator
impl Sync for LexicographicalComparator
impl Unpin for LexicographicalComparator
impl !UnwindSafe for LexicographicalComparator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more