Skip to content

Commit 81f34f8

Browse files
committed
Follow 'place children last' convention for GeneratedAggregate
1 parent 1bc36cc commit 81f34f8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/GeneratedAggregate.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ case class AggregateEvaluation(
4141
* ensure all values where `groupingExpressions` are equal are present.
4242
* @param groupingExpressions expressions that are evaluated to determine grouping.
4343
* @param aggregateExpressions expressions that are computed for each group.
44-
* @param child the input data source.
4544
* @param unsafeEnabled whether to allow Unsafe-based aggregation buffers to be used.
45+
* @param child the input data source.
4646
*/
4747
@DeveloperApi
4848
case class GeneratedAggregate(
4949
partial: Boolean,
5050
groupingExpressions: Seq[Expression],
5151
aggregateExpressions: Seq[NamedExpression],
52-
child: SparkPlan,
53-
unsafeEnabled: Boolean)
52+
unsafeEnabled: Boolean,
53+
child: SparkPlan)
5454
extends UnaryNode {
5555

5656
override def requiredChildDistribution: Seq[Distribution] =

sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
136136
partial = false,
137137
namedGroupingAttributes,
138138
rewrittenAggregateExpressions,
139+
unsafeEnabled,
139140
execution.GeneratedAggregate(
140141
partial = true,
141142
groupingExpressions,
142143
partialComputation,
143-
planLater(child),
144-
unsafeEnabled),
145-
unsafeEnabled) :: Nil
144+
unsafeEnabled,
145+
planLater(child))) :: Nil
146146

147147
// Cases where some aggregate can not be codegened
148148
case PartialAggregation(

0 commit comments

Comments
 (0)