diff options
author | Davies Liu <davies.liu@gmail.com> | 2016-03-09 10:05:57 -0800 |
---|---|---|
committer | Davies Liu <davies.liu@gmail.com> | 2016-03-09 10:05:57 -0800 |
commit | 7791d0c3a9bdfe73e071266846f9ab1491fce50c (patch) | |
tree | 61ea12e38162c90f452487cf765e964f020550e1 /sql/catalyst | |
parent | 9634e17d0183d43606a96fbba630e4c6ad720f7c (diff) | |
download | spark-7791d0c3a9bdfe73e071266846f9ab1491fce50c.tar.gz spark-7791d0c3a9bdfe73e071266846f9ab1491fce50c.tar.bz2 spark-7791d0c3a9bdfe73e071266846f9ab1491fce50c.zip |
Revert "[SPARK-13668][SQL] Reorder filter/join predicates to short-circuit isNotNull checks"
This reverts commit e430614eae53c8864b31a1dc64db83e27100d1d9.
Diffstat (limited to 'sql/catalyst')
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/QueryPlanner.scala | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/QueryPlanner.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/QueryPlanner.scala index 1e4523e2d8..56a3dd02f9 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/QueryPlanner.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/QueryPlanner.scala @@ -18,8 +18,6 @@ package org.apache.spark.sql.catalyst.planning import org.apache.spark.Logging -import org.apache.spark.sql.catalyst.expressions.{And, Expression, IsNotNull, PredicateHelper} -import org.apache.spark.sql.catalyst.plans import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan import org.apache.spark.sql.catalyst.trees.TreeNode @@ -28,28 +26,8 @@ import org.apache.spark.sql.catalyst.trees.TreeNode * be used for execution. If this strategy does not apply to the give logical operation then an * empty list should be returned. */ -abstract class GenericStrategy[PhysicalPlan <: TreeNode[PhysicalPlan]] - extends PredicateHelper with Logging { - +abstract class GenericStrategy[PhysicalPlan <: TreeNode[PhysicalPlan]] extends Logging { def apply(plan: LogicalPlan): Seq[PhysicalPlan] - - // Attempts to re-order the individual conjunctive predicates in an expression to short circuit - // the evaluation of relatively cheaper checks (e.g., checking for nullability) before others. - protected def reorderPredicates(expr: Expression): Expression = { - splitConjunctivePredicates(expr) - .sortWith((x, _) => x.isInstanceOf[IsNotNull]) - .reduce(And) - } - - // Wrapper around reorderPredicates(expr: Expression) to reorder optional conditions in joins - protected def reorderPredicates(exprOpt: Option[Expression]): Option[Expression] = { - exprOpt match { - case Some(expr) => - Option(reorderPredicates(expr)) - case None => - exprOpt - } - } } /** |