Trait tidb_query_aggr::ConcreteAggrFunctionState[][src]

pub trait ConcreteAggrFunctionState: Debug + Send + 'static {
    type ParameterType: EvaluableRef<'static>;
    unsafe fn update_concrete_unsafe(
        &mut self,
        ctx: &mut EvalContext,
        value: Option<Self::ParameterType>
    ) -> Result<()>;
fn push_result(
        &self,
        ctx: &mut EvalContext,
        target: &mut [VectorValue]
    ) -> Result<()>; }

A helper trait for single parameter aggregate function states that only work over concrete eval types. This is the actual and only trait that normal aggregate function states will implement.

Unlike AggrFunctionState, this trait only provides specialized update() and push_result() functions according to the associated type. update() and push_result() functions that accept any eval types (but will panic when eval type does not match expectation) will be generated via implementations over this trait.

Associated Types

type ParameterType: EvaluableRef<'static>[src]

Loading content...

Required methods

unsafe fn update_concrete_unsafe(
    &mut self,
    ctx: &mut EvalContext,
    value: Option<Self::ParameterType>
) -> Result<()>
[src]

Safety

This function should be called with update_concrete macro.

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

Loading content...

Implementors

impl ConcreteAggrFunctionState for AggrFnStateAvgForEnum where
    VectorValue: VectorValueExt<Enum>, 
[src]

type ParameterType = EnumRef<'static>

impl ConcreteAggrFunctionState for AggrFnStateAvgForSet where
    VectorValue: VectorValueExt<Set>, 
[src]

type ParameterType = SetRef<'static>

impl ConcreteAggrFunctionState for AggrFnStateSumForEnum where
    VectorValue: VectorValueExt<Decimal>, 
[src]

type ParameterType = EnumRef<'static>

impl ConcreteAggrFunctionState for AggrFnStateSumForSet where
    VectorValue: VectorValueExt<Decimal>, 
[src]

type ParameterType = SetRef<'static>

impl<C, E> ConcreteAggrFunctionState for AggFnStateExtremum4Bytes<C, E> where
    VectorValue: VectorValueExt<Bytes>,
    C: Collator,
    E: Extremum
[src]

type ParameterType = BytesRef<'static>

impl<E> ConcreteAggrFunctionState for AggFnStateExtremumForEnum<E> where
    E: Extremum,
    VectorValue: VectorValueExt<Enum>, 
[src]

type ParameterType = EnumRef<'static>

impl<E> ConcreteAggrFunctionState for AggFnStateExtremumForSet<E> where
    E: Extremum,
    VectorValue: VectorValueExt<Set>, 
[src]

type ParameterType = SetRef<'static>

impl<E, const IS_UNSIGNED: bool> ConcreteAggrFunctionState for AggFnStateExtremumForInt<E, IS_UNSIGNED> where
    E: Extremum,
    VectorValue: VectorValueExt<Int>, 
[src]

type ParameterType = &'static Int

impl<T> ConcreteAggrFunctionState for AggrFnStateAvg<T> where
    T: Summable,
    VectorValue: VectorValueExt<T>, 
[src]

type ParameterType = &'static T

impl<T> ConcreteAggrFunctionState for AggrFnStateSum<T> where
    T: Summable,
    VectorValue: VectorValueExt<T>, 
[src]

type ParameterType = &'static T

impl<T, E> ConcreteAggrFunctionState for AggFnStateExtremum<T, E> where
    T: EvaluableRef<'static> + 'static + Ord,
    E: Extremum,
    VectorValue: VectorValueExt<T::EvaluableType>, 
[src]

type ParameterType = T

impl<T, V> ConcreteAggrFunctionState for AggrFnStateVariance<T, V> where
    T: Summable,
    V: VarianceType,
    VectorValue: VectorValueExt<T>, 
[src]

type ParameterType = &'static T

impl<T: BitOp> ConcreteAggrFunctionState for AggrFnStateBitOp<T>[src]

type ParameterType = &'static Int

impl<V> ConcreteAggrFunctionState for AggrFnStateVarianceForEnum<V> where
    V: VarianceType,
    VectorValue: VectorValueExt<Decimal>, 
[src]

type ParameterType = EnumRef<'static>

impl<V> ConcreteAggrFunctionState for AggrFnStateVarianceForSet<V> where
    V: VarianceType,
    VectorValue: VectorValueExt<Decimal>, 
[src]

type ParameterType = SetRef<'static>

Loading content...