GitHub user mgaido91 opened a pull request: https://github.com/apache/spark/pull/19940
[SPARK-22750][SQL] Reuse mutable states when possible ## What changes were proposed in this pull request? The PR introduces a new method `addSingleMutableState ` to `CodeGenerator` to allow reusing and sharing the same global variable between different Expressions. This helps reducing the number of global variables needed, which is important to limit the impact on the constant pool. ## How was this patch tested? added UTs You can merge this pull request into a Git repository by running: $ git pull https://github.com/mgaido91/spark SPARK-22750 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/19940.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #19940 ---- commit 978bfd6a490cfef2c0f2da1190830ef6a64287af Author: Marco Gaido <marcogaid...@gmail.com> Date: 2017-12-10T11:23:10Z [SPARK-22750][SQL] Reuse mutable states when possible ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org