Skip to content

Commit 6d600d5

Browse files
committed
Fix aggregation.
1 parent 0bb8c0e commit 6d600d5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ trait CodegenSupport extends SparkPlan {
222222

223223
s"""
224224
| boolean continueForLoop = $doConsumeFuncName($callingParams);
225-
| if (continueForLoop) $effectiveContinueStatement;
225+
| if (continueForLoop) $effectiveContinueStatement
226226
""".stripMargin
227227
}
228228

sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ case class HashAggregateExec(
163163
// The variables used as aggregation buffer. Only used for aggregation without keys.
164164
private var bufVars: Seq[ExprCode] = _
165165

166+
override protected def effectiveContinueStatement: String = "continue;"
167+
166168
private def doProduceWithoutKeys(ctx: CodegenContext): String = {
167169
val initAgg = ctx.freshName("initAgg")
168170
ctx.addMutableState("boolean", initAgg, s"$initAgg = false;")

0 commit comments

Comments
 (0)