Struct FixedLexicographicalComparator
pub struct FixedLexicographicalComparator<const N: usize> {
compare_items: [Box<dyn Fn(usize, usize) -> Ordering + Send + Sync>; N],
}
Expand description
A lexicographical comparator that wraps given array data (columns) and can lexicographically compare data at given two indices. This version of the comparator is for compile-time constant number of columns. The lifetime is the same at the data wrapped.
Fields§
§compare_items: [Box<dyn Fn(usize, usize) -> Ordering + Send + Sync>; N]
Implementations§
§impl<const N: usize> FixedLexicographicalComparator<N>
impl<const N: usize> FixedLexicographicalComparator<N>
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<FixedLexicographicalComparator<N>, ArrowError>
pub fn try_new( columns: &[SortColumn], ) -> Result<FixedLexicographicalComparator<N>, ArrowError>
Create a new lex comparator that will wrap the given sort columns and give comparison results with two indices. The number of columns should be equal to the compile-time constant N.
Auto Trait Implementations§
impl<const N: usize> Freeze for FixedLexicographicalComparator<N>
impl<const N: usize> !RefUnwindSafe for FixedLexicographicalComparator<N>
impl<const N: usize> Send for FixedLexicographicalComparator<N>
impl<const N: usize> Sync for FixedLexicographicalComparator<N>
impl<const N: usize> Unpin for FixedLexicographicalComparator<N>
impl<const N: usize> !UnwindSafe for FixedLexicographicalComparator<N>
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