Trait partiql_eval::eval::evaluable::AggregateFunction
source · 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§
sourcefn next_value(&self, input_value: &Value, state: &mut Option<Value>)
fn next_value(&self, input_value: &Value, state: &mut Option<Value>)
Provides the next value for the given group
.