Github user cloud-fan commented on the issue: https://github.com/apache/spark/pull/19813 I did a search but can't find one in the current codebase, but I do think this is a valid idea, e.g. a simple example would be `a + b + .... z`, if expressions can output statement, then we just generate code like ``` int result = a + b ... + z; boolean isNull = false; ``` instead of ``` int result 1 = a + b; boolean isNull1 = false; int result2 = result1 + c; boolean isNull2 = false; ... ``` This can apply to both whole stage codegen and normal codegen, and reduce the code size dramatically, and make whole stage codegen less likely to hit 64kb compile error. Another thing I'm working on is: do not create global variables if `ctx.spiltExpression` doesn't spit. This optimization should be much more useful if combined with this optimization.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org