pub trait Sorter: Send {
// Required methods
fn push_n(&mut self, value: Option<BytesRef<'_>>, n: usize) -> bool;
fn spill<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn output<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<SortOutput>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handles data sorting, supporting incremental input and retrieval of sorted output
Required Methods§
Sourcefn push_n(&mut self, value: Option<BytesRef<'_>>, n: usize) -> bool
fn push_n(&mut self, value: Option<BytesRef<'_>>, n: usize) -> bool
Buffers n identical non-null or null values in memory.
Returns true when the buffer should be spilled with Sorter::spill before more
values are pushed. Kept synchronous so the per-row path does not allocate a future.