You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/21 12:33:33 UTC

[GitHub] [spark] maropu commented on a change in pull request #31901: [SPARK-34802][SQL] Move simplify expression rules before operator push down

maropu commented on a change in pull request #31901:
URL: https://github.com/apache/spark/pull/31901#discussion_r598272364



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -70,10 +70,19 @@ abstract class Optimizer(catalogManager: CatalogManager)
   def defaultBatches: Seq[Batch] = {
     val operatorOptimizationRuleSet =
       Seq(
-        // Operator push down
-        PushProjectionThroughUnion,
+        // Optimize join
         ReorderJoin,
         EliminateOuterJoin,
+        // Simplify expressions
+        BooleanSimplification,
+        SimplifyConditionals,
+        PushFoldableIntoBranches,
+        RemoveDispensableExpressions,
+        SimplifyBinaryComparison,
+        ReplaceNullWithFalseInPredicate,
+        SimplifyConditionalsInPredicate,

Review comment:
       It seems the rules that simplify exprs still exist at the bottom (e.g., `SimplifyCasts` and `SimplifyExtractValueOps`. We don't need to move them, too?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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