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 2020/06/11 06:27:28 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #28785: [SPARK-31958][SQL] normalize special floating numbers in subquery

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:
users@infra.apache.org



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