Trait tidb_query_aggr::ConcreteAggrFunctionState [−][src]
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]
Required methods
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
Safety
This function should be called with update_concrete
macro.
fn push_result(
&self,
ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
Implementors
impl ConcreteAggrFunctionState for AggrFnStateAvgForEnum where
VectorValue: VectorValueExt<Enum>,
[src]
VectorValue: VectorValueExt<Enum>,
type ParameterType = EnumRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl ConcreteAggrFunctionState for AggrFnStateAvgForSet where
VectorValue: VectorValueExt<Set>,
[src]
VectorValue: VectorValueExt<Set>,
type ParameterType = SetRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl ConcreteAggrFunctionState for AggrFnStateSumForEnum where
VectorValue: VectorValueExt<Decimal>,
[src]
VectorValue: VectorValueExt<Decimal>,
type ParameterType = EnumRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl ConcreteAggrFunctionState for AggrFnStateSumForSet where
VectorValue: VectorValueExt<Decimal>,
[src]
VectorValue: VectorValueExt<Decimal>,
type ParameterType = SetRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<C, E> ConcreteAggrFunctionState for AggFnStateExtremum4Bytes<C, E> where
VectorValue: VectorValueExt<Bytes>,
C: Collator,
E: Extremum,
[src]
VectorValue: VectorValueExt<Bytes>,
C: Collator,
E: Extremum,
type ParameterType = BytesRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
_ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
_ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<E> ConcreteAggrFunctionState for AggFnStateExtremumForEnum<E> where
E: Extremum,
VectorValue: VectorValueExt<Enum>,
[src]
E: Extremum,
VectorValue: VectorValueExt<Enum>,
type ParameterType = EnumRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<E> ConcreteAggrFunctionState for AggFnStateExtremumForSet<E> where
E: Extremum,
VectorValue: VectorValueExt<Set>,
[src]
E: Extremum,
VectorValue: VectorValueExt<Set>,
type ParameterType = SetRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<E, const IS_UNSIGNED: bool> ConcreteAggrFunctionState for AggFnStateExtremumForInt<E, IS_UNSIGNED> where
E: Extremum,
VectorValue: VectorValueExt<Int>,
[src]
E: Extremum,
VectorValue: VectorValueExt<Int>,
type ParameterType = &'static Int
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<T> ConcreteAggrFunctionState for AggrFnStateAvg<T> where
T: Summable,
VectorValue: VectorValueExt<T>,
[src]
T: Summable,
VectorValue: VectorValueExt<T>,
type ParameterType = &'static T
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<T> ConcreteAggrFunctionState for AggrFnStateSum<T> where
T: Summable,
VectorValue: VectorValueExt<T>,
[src]
T: Summable,
VectorValue: VectorValueExt<T>,
type ParameterType = &'static T
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<T, E> ConcreteAggrFunctionState for AggFnStateExtremum<T, E> where
T: EvaluableRef<'static> + 'static + Ord,
E: Extremum,
VectorValue: VectorValueExt<T::EvaluableType>,
[src]
T: EvaluableRef<'static> + 'static + Ord,
E: Extremum,
VectorValue: VectorValueExt<T::EvaluableType>,
type ParameterType = T
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<T, V> ConcreteAggrFunctionState for AggrFnStateVariance<T, V> where
T: Summable,
V: VarianceType,
VectorValue: VectorValueExt<T>,
[src]
T: Summable,
V: VarianceType,
VectorValue: VectorValueExt<T>,
type ParameterType = &'static T
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<T: BitOp> ConcreteAggrFunctionState for AggrFnStateBitOp<T>
[src]
type ParameterType = &'static Int
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<V> ConcreteAggrFunctionState for AggrFnStateVarianceForEnum<V> where
V: VarianceType,
VectorValue: VectorValueExt<Decimal>,
[src]
V: VarianceType,
VectorValue: VectorValueExt<Decimal>,
type ParameterType = EnumRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
impl<V> ConcreteAggrFunctionState for AggrFnStateVarianceForSet<V> where
V: VarianceType,
VectorValue: VectorValueExt<Decimal>,
[src]
V: VarianceType,
VectorValue: VectorValueExt<Decimal>,
type ParameterType = SetRef<'static>
unsafe fn update_concrete_unsafe(
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
value: Option<Self::ParameterType>
) -> Result<()>
fn push_result(
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>
[src]
&self,
_ctx: &mut EvalContext,
target: &mut [VectorValue]
) -> Result<()>