Github user rednaxelafx commented on a diff in the pull request:
https://github.com/apache/spark/pull/21039#discussion_r180721843
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
---
@@ -236,6 +236,8 @@ case class HashAggregateExec(
| }
""".stripMargin)
+ bufVars = null // explicitly null this field out to allow the
referent to be GC'd sooner
--- End diff --
The workflow of whole-stage codegen ensures that `doConsumeWithoutKeys` can
only be on the call stack when `doProduceWithoutKeys` is also on the call
stack; the liveness of the former is strictly a subset of the latter.
That's because for a plan tree that looks like:
```
+- A
+- B
+- C
```
The whole-stage codegen system (mostly) works like:
```
A.produce
|------> B.produce
| |------> C.produce
| | |------> B.consume
| | | |------> A.consume
| | | | |
| | | |<-------o
| | |<--------o
| |<--------o
|<--------o
o
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]