Trait tidb_query_aggr::AggrFunctionState[][src]

pub trait AggrFunctionState: Debug + Send + 'static + AggrFunctionStateUpdatePartial<&'static Int> + AggrFunctionStateUpdatePartial<&'static Real> + AggrFunctionStateUpdatePartial<&'static Decimal> + AggrFunctionStateUpdatePartial<BytesRef<'static>> + AggrFunctionStateUpdatePartial<&'static DateTime> + AggrFunctionStateUpdatePartial<&'static Duration> + AggrFunctionStateUpdatePartial<JsonRef<'static>> + AggrFunctionStateUpdatePartial<EnumRef<'static>> + AggrFunctionStateUpdatePartial<SetRef<'static>> {
    fn push_result(
        &self,
        ctx: &mut EvalContext,
        target: &mut [VectorValue]
    ) -> Result<()>; }

A trait for all single parameter aggregate function states.

Aggregate function states are created by corresponding aggregate functions. For each state, it can be updated or aggregated (to finalize a result) independently.

Note that aggregate function states are strongly typed, that is, the caller must provide the parameter in the correct data type for an aggregate function states that calculates over this data type. To be safely boxed and placed in a vector, interfaces are provided in a form that accept all kinds of data type. However, unmatched types will result in panics in runtime.

Required methods

fn push_result(
    &self,
    ctx: &mut EvalContext,
    target: &mut [VectorValue]
) -> Result<()>
[src]

Loading content...

Implementors

impl AggrFunctionState for AggrFnStateCount[src]

impl<F> AggrFunctionState for F where
    F: ConcreteAggrFunctionState
[src]

impl<T> AggrFunctionState for AggrFnStateFirst<T> where
    T: EvaluableRef<'static> + 'static,
    VectorValue: VectorValueExt<T::EvaluableType>, 
[src]

Loading content...