pub struct ExternalAggregate { /* private fields */ }Expand description
External aggregate operator
Implements memory-bounded aggregation with disk spilling.
Implementations§
Source§impl ExternalAggregate
impl ExternalAggregate
Sourcepub fn new(
controller: &Arc<MemoryController>,
num_key_columns: usize,
aggregate_specs: Vec<AggregateSpec>,
) -> Self
pub fn new( controller: &Arc<MemoryController>, num_key_columns: usize, aggregate_specs: Vec<AggregateSpec>, ) -> Self
Create a new external aggregate operator
Sourcepub fn with_config(
controller: &Arc<MemoryController>,
num_key_columns: usize,
aggregate_specs: Vec<AggregateSpec>,
config: ExternalAggregateConfig,
) -> Self
pub fn with_config( controller: &Arc<MemoryController>, num_key_columns: usize, aggregate_specs: Vec<AggregateSpec>, config: ExternalAggregateConfig, ) -> Self
Create with custom configuration
Sourcepub fn add_row(&mut self, row: &[SqlValue]) -> Result<()>
pub fn add_row(&mut self, row: &[SqlValue]) -> Result<()>
Add a row to the aggregate
The row should have the group key columns first, followed by the aggregate value columns.
Sourcepub fn finish(self) -> Result<AggregateResultIterator>
pub fn finish(self) -> Result<AggregateResultIterator>
Finish aggregation and return results iterator
Sourcepub fn num_groups(&self) -> usize
pub fn num_groups(&self) -> usize
Get the number of groups
Sourcepub fn num_spilled_partitions(&self) -> usize
pub fn num_spilled_partitions(&self) -> usize
Get the number of spilled partitions
Auto Trait Implementations§
impl Freeze for ExternalAggregate
impl RefUnwindSafe for ExternalAggregate
impl Send for ExternalAggregate
impl Sync for ExternalAggregate
impl Unpin for ExternalAggregate
impl UnwindSafe for ExternalAggregate
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
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