Skip to content

Commit

Permalink
Follow 'place children last' convention for GeneratedAggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Apr 29, 2015
1 parent 1bc36cc commit 81f34f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ case class AggregateEvaluation(
* ensure all values where `groupingExpressions` are equal are present.
* @param groupingExpressions expressions that are evaluated to determine grouping.
* @param aggregateExpressions expressions that are computed for each group.
* @param child the input data source.
* @param unsafeEnabled whether to allow Unsafe-based aggregation buffers to be used.
* @param child the input data source.
*/
@DeveloperApi
case class GeneratedAggregate(
partial: Boolean,
groupingExpressions: Seq[Expression],
aggregateExpressions: Seq[NamedExpression],
child: SparkPlan,
unsafeEnabled: Boolean)
unsafeEnabled: Boolean,
child: SparkPlan)
extends UnaryNode {

override def requiredChildDistribution: Seq[Distribution] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
partial = false,
namedGroupingAttributes,
rewrittenAggregateExpressions,
unsafeEnabled,
execution.GeneratedAggregate(
partial = true,
groupingExpressions,
partialComputation,
planLater(child),
unsafeEnabled),
unsafeEnabled) :: Nil
unsafeEnabled,
planLater(child))) :: Nil

// Cases where some aggregate can not be codegened
case PartialAggregation(
Expand Down

0 comments on commit 81f34f8

Please sign in to comment.