SuccessChanges

Summary

  1. [SPARK-23760][SQL] CodegenContext.withSubExprEliminationExprs should (commit: 4da8c22f77475d1b328375e97e2825e1dea78fdd) (details)
Commit 4da8c22f77475d1b328375e97e2825e1dea78fdd by wenchen
[SPARK-23760][SQL] CodegenContext.withSubExprEliminationExprs should
save/restore CSE state correctly
## What changes were proposed in this pull request?
Fixed `CodegenContext.withSubExprEliminationExprs()` so that it
saves/restores CSE state correctly.
## How was this patch tested?
Added new unit test to verify that the old CSE state is indeed saved and
restored around the `withSubExprEliminationExprs()` call. Manually
verified that this test fails without this patch.
Author: Kris Mok <kris.mok@databricks.com>
Closes #20870 from rednaxelafx/codegen-subexpr-fix.
(cherry picked from commit 95e51ff849a4c46cae463636b1ee393042469e7b)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(commit: 4da8c22f77475d1b328375e97e2825e1dea78fdd)
The file was modifiedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CodeGenerationSuite.scala (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala (diff)