Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19797#discussion_r153383615
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/complexTypesSuite.scala
---
@@ -164,6 +165,28 @@ class ComplexTypesSuite extends PlanTest{
comparePlans(Optimizer execute query, expected)
}
+ test("SPARK-22570: should not create a lot of instance variables") {
+ val ctx = new CodegenContext
--- End diff --
something like this, we have a codegen context, and do codegen. After that,
instead of compiling the code to make sure it doesn't fail, we can just check
the size of `ctx.mutableStates` to confirm that we don't add global variables
during codegen
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]