mz_expr

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§