Trait mz_expr::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§

source

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).

source

fn give(&mut self, d: &Datum<'_>)

Pushes one input element into the aggregation.

source

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.

Implementors§