Skip to content

BaseAggregateExec Unary Physical Operators

BaseAggregateExec is an extension of the UnaryExecNode abstraction for aggregate unary physical operators.


Aggregate Attributes

aggregateAttributes: Seq[Attribute]

Aggregate Attributes

Used when:

Aggregate Functions

aggregateExpressions: Seq[AggregateExpression]


Grouping Keys

groupingExpressions: Seq[NamedExpression]

NamedExpressions of the grouping keys


initialInputBufferOffset: Int


isStreaming: Boolean

Used when:


numShufflePartitions: Option[Int]

Used when:

Required Child Distribution Expressions

requiredChildDistributionExpressions: Option[Seq[Expression]]


Used when:

Result Expressions

resultExpressions: Seq[NamedExpression]

NamedExpressions of the result



BaseAggregateExec is an AliasAwareOutputPartitioning.

Detailed Description (with Operator Id)

verboseStringWithOperatorId(): String

verboseStringWithOperatorId is part of the QueryPlan abstraction.

verboseStringWithOperatorId returns the following text (with the formattedNodeName and the others):

Input [size]: [output]
Keys [size]: [groupingExpressions]
Functions [size]: [aggregateExpressions]
Aggregate Attributes [size]: [aggregateAttributes]
Results [size]: [resultExpressions]
Field Description
formattedNodeName (operatorId) nodeName [codegen id : $id]
Input Output schema of the single child operator
Keys Grouping Keys
Functions Aggregate Functions
Aggregate Attributes Aggregate Attributes
Results Result Expressions

Required Child Output Distribution

requiredChildDistribution: List[Distribution]

requiredChildDistribution is part of the SparkPlan abstraction.


Produced Attributes (Schema)

producedAttributes: AttributeSet

producedAttributes is part of the QueryPlan abstraction.

producedAttributes is the following:

Aggregate Buffer Attributes (Schema)

aggregateBufferAttributes: Seq[AttributeReference]

aggregateBufferAttributes is the aggBufferAttributes of the AggregateFunctions of all the Aggregate Functions.

aggregateBufferAttributes is used when: