DeclarativeAggregate — Unevaluable Aggregate Function Expressions¶
DeclarativeAggregate
is an extension of the AggregateFunction abstraction for aggregate function expressions that are unevaluable and use expressions for evaluation.
Contract¶
evaluateExpression¶
evaluateExpression: Expression
Expression to calculate the final value of this aggregate function
Used when:
EliminateAggregateFilter
logical optimization is executedAggregatingAccumulator
utility is used to create anAggregatingAccumulator
AggregationIterator
is requested for the generateResultProjectionHashAggregateExec
physical operator is requested to doProduceWithoutKeys and generateResultFunctionAggregateProcessor
is created
initialValues¶
initialValues: Seq[Expression]
Expression for initial values of this aggregate function
Used when:
EliminateAggregateFilter
logical optimization is executedAggregatingAccumulator
utility is used to create anAggregatingAccumulator
AggregationIterator
is createdHashAggregateExec
physical operator is requested to doProduceWithoutKeys, createHashMap and getEmptyAggregationBufferHashMapGenerator
is createdAggregateProcessor
is created
mergeExpressions¶
mergeExpressions: Seq[Expression]
updateExpressions¶
updateExpressions: Seq[Expression]
Implementations¶
- AggregateWindowFunction
Average
BitAggregate
CentralMomentAgg
Count
Covariance
- First
Last
Max
MaxMinBy
Min
PearsonCorrelation
Product
SimpleTypedAggregateExpression
Sum
UnevaluableAggregate