pub struct PrimitiveHeap<VAL: ArrowPrimitiveType>where
<VAL as ArrowPrimitiveType>::Native: Comparable,{
batch: ArrayRef,
heap: TopKHeap<VAL::Native>,
desc: bool,
data_type: DataType,
}Expand description
An implementation of ArrowHeap that deals with primitive values
Fields§
§batch: ArrayRef§heap: TopKHeap<VAL::Native>§desc: bool§data_type: DataTypeImplementations§
Source§impl<VAL: ArrowPrimitiveType> PrimitiveHeap<VAL>where
<VAL as ArrowPrimitiveType>::Native: Comparable,
impl<VAL: ArrowPrimitiveType> PrimitiveHeap<VAL>where
<VAL as ArrowPrimitiveType>::Native: Comparable,
Trait Implementations§
Source§impl<VAL: ArrowPrimitiveType> ArrowHeap for PrimitiveHeap<VAL>where
<VAL as ArrowPrimitiveType>::Native: Comparable,
impl<VAL: ArrowPrimitiveType> ArrowHeap for PrimitiveHeap<VAL>where
<VAL as ArrowPrimitiveType>::Native: Comparable,
fn set_batch(&mut self, vals: ArrayRef)
fn is_worse(&self, row_idx: usize) -> bool
fn worst_map_idx(&self) -> usize
fn renumber(&mut self, heap_to_map: &[(usize, usize)])
fn insert( &mut self, row_idx: usize, map_idx: usize, map: &mut Vec<(usize, usize)>, )
fn replace_if_better( &mut self, heap_idx: usize, row_idx: usize, map: &mut Vec<(usize, usize)>, )
fn drain(&mut self) -> (ArrayRef, Vec<usize>)
Auto Trait Implementations§
impl<VAL> Freeze for PrimitiveHeap<VAL>
impl<VAL> !RefUnwindSafe for PrimitiveHeap<VAL>
impl<VAL> Send for PrimitiveHeap<VAL>
impl<VAL> Sync for PrimitiveHeap<VAL>
impl<VAL> Unpin for PrimitiveHeap<VAL>where
<VAL as ArrowPrimitiveType>::Native: Unpin,
impl<VAL> !UnwindSafe for PrimitiveHeap<VAL>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more