Skip to content

Commit e904dfa

Browse files
committed
Revert "[SPARK-23960][SQL][MINOR] Mark HashAggregateExec.bufVars as transient"
This reverts commit 271c891.
1 parent 9d960de commit e904dfa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ case class HashAggregateExec(
174174
}
175175
}
176176

177-
// The variables used as aggregation buffer. Only used in codegen for aggregation without keys.
178-
@transient private var bufVars: Seq[ExprCode] = _
177+
// The variables used as aggregation buffer. Only used for aggregation without keys.
178+
private var bufVars: Seq[ExprCode] = _
179179

180180
private def doProduceWithoutKeys(ctx: CodegenContext): String = {
181181
val initAgg = ctx.addMutableState(CodeGenerator.JAVA_BOOLEAN, "initAgg")
@@ -238,8 +238,6 @@ case class HashAggregateExec(
238238
| }
239239
""".stripMargin)
240240

241-
bufVars = null // explicitly null this field out to allow the referent to be GC'd sooner
242-
243241
val numOutput = metricTerm(ctx, "numOutputRows")
244242
val aggTime = metricTerm(ctx, "aggTime")
245243
val beforeAgg = ctx.freshName("beforeAgg")

0 commit comments

Comments
 (0)