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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to