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 2022/08/23 14:33:45 UTC

[GitHub] [spark] peter-toth commented on a diff in pull request #37630: [SPARK-40193][SQL] Merge subquery plans with different filters

peter-toth commented on code in PR #37630:
URL: https://github.com/apache/spark/pull/37630#discussion_r952708961


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkOptimizer.scala:
##########
@@ -78,6 +77,9 @@ class SparkOptimizer(
       PushPredicateThroughNonJoin,
       RemoveNoopOperators) :+
     Batch("User Provided Optimizers", fixedPoint, experimentalMethods.extraOptimizations: _*) :+
+    Batch("Merge Scalar Subqueries", Once,

Review Comment:
   I've moved the `MergeScalarSubqueries` rule to the end of optimization phase, just before `ReplaceCTERefWithRepartition`. This is needed because we need to peek into the physical plans.



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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