pub trait ArrowHeap {
// Required methods
fn set_batch(&mut self, vals: ArrayRef);
fn is_worse(&self, 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>);
}Expand description
An interface to hide the generic type signature of TopKHeap behind arrow arrays