AggregateExpression — Unevaluable Expression Container for AggregateFunction
AggregateExpression
is an unevaluable expression (i.e. with no support for eval
and doGenCode
methods) that acts as a container for an AggregateFunction.
AggregateExpression
contains the following:
-
isDistinct
flag indicating whether this aggregation is distinct or not (e.g. whether SQL’sDISTINCT
keyword was used for the aggregate function)
AggregateExpression
is created when:
-
Analyzer
resolves AggregateFunctions (and creates anAggregateExpression
withComplete
aggregate mode for the functions) -
UserDefinedAggregateFunction
is created withisDistinct
flag disabled or enabled -
AggUtils
is requested to planAggregateWithOneDistinct (and createsAggregateExpressions
withPartial
andFinal
aggregate modes for the functions) -
Aggregator
is requested for a TypedColumn (usingAggregator.toColumn
) -
AggregateFunction
is wrapped in a AggregateExpression
Prefix | AggregateMode |
---|---|
|
|
|
|
(empty) |
|
Name | Description |
---|---|
|
AggregateExpression with AggregateFunction expression |
|
AggregateFunction expression (for which |
|
DataType of AggregateFunction expression |
|
Disabled (i.e. |
|
Whether or not AggregateFunction expression is nullable. |
|
|
|
Attribute that is:
|
|
Requests AggregateFunction to generate SQL output (with isDistinct flag). |
|
Prefix per AggregateMode followed by AggregateFunction‘s |