Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/19797#discussion_r154071513 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala --- @@ -845,4 +846,11 @@ class CastSuite extends SparkFunSuite with ExpressionEvalHelper { val outputOuter = Row.fromSeq((1 to N).map(_ => outputInner)) checkEvaluation(cast(Literal.create(inputOuter, fromOuter), toOuter), outputOuter) } + + test("SPARK-22570: Cast should not create a lot of instance variables") { + val ctx = new CodegenContext + cast("1", IntegerType).genCode(ctx).code + cast("2", LongType).genCode(ctx).code --- End diff -- nit: no need to call `code`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org