pub trait AggregateFunction: Debug {
    // Required methods
    fn next_value(&self, input_value: &Value, state: &mut Option<Value>);
    fn finalize(&self, state: Option<Value>) -> Result<Value, EvaluationError>;

    // Provided method
    fn next_distinct(
        &self,
        input_value: &Value,
        state: &mut Option<Value>,
        seen: &mut FxHashMap<Value, ()>
    ) { ... }
}
Expand description

Represents an SQL aggregation function computed on a collection of input values.

Required Methods§

source

fn next_value(&self, input_value: &Value, state: &mut Option<Value>)

Provides the next value for the given group.

source

fn finalize(&self, state: Option<Value>) -> Result<Value, EvaluationError>

Returns the result of the aggregation function for a given group.

Provided Methods§

source

fn next_distinct( &self, input_value: &Value, state: &mut Option<Value>, seen: &mut FxHashMap<Value, ()> )

Implementors§