cloud-fan commented on a change in pull request #28785:
URL: https://github.com/apache/spark/pull/28785#discussion_r438568381



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NormalizeFloatingNumbers.scala
##########
@@ -56,10 +56,6 @@ import org.apache.spark.sql.types._
 object NormalizeFloatingNumbers extends Rule[LogicalPlan] {
 
   def apply(plan: LogicalPlan): LogicalPlan = plan match {
-    // A subquery will be rewritten into join later, and will go through this 
rule
-    // eventually. Here we skip subquery, as we only need to run this rule 
once.
-    case _: Subquery => plan

Review comment:
       No we can't.
   
   This fix relies on the rule `OptimizeSubqueries`, which is an inner object 
of the `class Optimizer` as it needs to rerun the entire optimizer for 
subquery. So we can't use `OptimizeSubqueries` in 
`NormalizeFloatingPointNumbersSuite`.




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



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

Reply via email to