You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by jo...@apache.org on 2016/09/01 21:13:45 UTC

spark git commit: [SPARK-16732][SQL] Remove unused codes in subexpressionEliminationForWholeStageCodegen

Repository: spark
Updated Branches:
  refs/heads/master 473d78649 -> e388bd544


[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 <yu...@intel.com>

Closes #14366 from yucai/subExpr_unused_codes.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e388bd54
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e388bd54
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e388bd54

Branch: refs/heads/master
Commit: e388bd54499cb4c26a0e14efd47af0c684ca250f
Parents: 473d786
Author: Yucai Yu <yu...@intel.com>
Authored: Thu Sep 1 14:13:38 2016 -0700
Committer: Josh Rosen <jo...@databricks.com>
Committed: Thu Sep 1 14:13:38 2016 -0700

----------------------------------------------------------------------
 .../spark/sql/catalyst/expressions/codegen/CodeGenerator.scala   | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e388bd54/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
----------------------------------------------------------------------
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 4bd9ee0..28064a5 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)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org