Skip to content

Commit 8ffe73e

Browse files
author
Davies Liu
committed
address offline comments
1 parent 4fcd0c7 commit 8ffe73e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-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
@@ -131,7 +131,7 @@ trait CodegenSupport extends SparkPlan {
131131
}
132132
val evaluateInputs = evaluateVariables(outputVars)
133133
// generate the code to create a UnsafeRow
134-
ctx.INPUT_ROW = null
134+
ctx.INPUT_ROW = row
135135
ctx.currentVars = outputVars
136136
val ev = GenerateUnsafeProjection.createCode(ctx, colExprs, false)
137137
val code = s"""

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ case class TungstenAggregate(
599599

600600
// create grouping key
601601
ctx.currentVars = input
602+
// make sure that the generated code will not be splitted as multiple functions
602603
ctx.INPUT_ROW = null
603604
val unsafeRowKeyCode = GenerateUnsafeProjection.createCode(
604605
ctx, groupingExpressions.map(e => BindReferences.bindReference[Expression](e, child.output)))

0 commit comments

Comments
 (0)