diff options
author | Yucai Yu <yucai.yu@intel.com> | 2016-09-01 14:13:38 -0700 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2016-09-01 14:13:38 -0700 |
commit | e388bd54499cb4c26a0e14efd47af0c684ca250f (patch) | |
tree | 8944c0d2aacb0ae5f9fcfff30567a7ab1f11d3d1 | |
parent | 473d78649dec7583bcc4ec24b6f38303c38e81a2 (diff) | |
download | spark-e388bd54499cb4c26a0e14efd47af0c684ca250f.tar.gz spark-e388bd54499cb4c26a0e14efd47af0c684ca250f.tar.bz2 spark-e388bd54499cb4c26a0e14efd47af0c684ca250f.zip |
[SPARK-16732][SQL] Remove unused codes in subexpressionEliminationForWholeStageCodegen
## What changes were proposed in this pull request?
Some codes in subexpressionEliminationForWholeStageCodegen are never used actually.
Remove them using this PR.
## How was this patch tested?
Local unit tests.
Author: Yucai Yu <yucai.yu@intel.com>
Closes #14366 from yucai/subExpr_unused_codes.
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala index 4bd9ee03f9..28064a5cfa 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala @@ -662,10 +662,6 @@ class CodegenContext { val commonExprs = equivalentExpressions.getAllEquivalentExprs.filter(_.size > 1) val codes = commonExprs.map { e => val expr = e.head - val fnName = freshName("evalExpr") - val isNull = s"${fnName}IsNull" - val value = s"${fnName}Value" - // Generate the code for this expression tree. val code = expr.genCode(this) val state = SubExprEliminationState(code.isNull, code.value) |