yeshengm commented on a change in pull request #25080: [SPARK-28306][SQL] Make 
NormalizeFloatingNumbers rule idempotent
URL: https://github.com/apache/spark/pull/25080#discussion_r301384499
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NormalizeFloatingNumbers.scala
 ##########
 @@ -116,7 +124,7 @@ object NormalizeFloatingNumbers extends Rule[LogicalPlan] {
       CreateMap(children.map(normalize))
 
     case _ if expr.dataType == FloatType || expr.dataType == DoubleType =>
-      NormalizeNaNAndZero(expr)
+      KnownFloatingPointNormalized(NormalizeNaNAndZero(expr))
 
 Review comment:
   The problem is from `TransformArray`, since we can't easily tell whether a 
`TransformArray` is for FP normalization or not.  Otherwise we can just check 
for `NormalizeNaNAndZero`.

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


With regards,
Apache Git Services

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

Reply via email to