Trait mz_expr::relation::func::OneByOneAggr
source · pub trait OneByOneAggr {
// Required methods
fn new(agg: &AggregateFunc, reverse: bool) -> Self;
fn give(&mut self, d: &Datum<'_>);
fn get_current_aggregate<'a>(&self, temp_storage: &'a RowArena) -> Datum<'a>;
}
Expand description
An implementation of an aggregation where we can send in the input elements one-by-one, and can also ask the current aggregate at any moment. (This just delegates to other aggregation evaluation approaches.)
Required Methods§
sourcefn new(agg: &AggregateFunc, reverse: bool) -> Self
fn new(agg: &AggregateFunc, reverse: bool) -> Self
The reverse
parameter makes the aggregations process input elements in reverse order.
This has an effect only for non-commutative aggregations, e.g. list_agg
. These are
currently only some of the Basic aggregations. (Basic aggregations are handled by
NaiveOneByOneAggr
).
sourcefn get_current_aggregate<'a>(&self, temp_storage: &'a RowArena) -> Datum<'a>
fn get_current_aggregate<'a>(&self, temp_storage: &'a RowArena) -> Datum<'a>
Returns the value of the aggregate computed on the given values so far.
Object Safety§
This trait is not object safe.