cloud-fan commented on a change in pull request #23692:
[SPARK-26448][SQL][followup] should not normalize grouping expressions for
final aggregate
URL: https://github.com/apache/spark/pull/23692#discussion_r252130666
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NormalizeFloatingNumbers.scala
##########
@@ -98,8 +98,10 @@ object NormalizeFloatingNumbers extends Rule[LogicalPlan] {
}
private[sql] def normalize(expr: Expression): Expression = expr match {
- case _ if expr.dataType == FloatType || expr.dataType == DoubleType =>
- NormalizeNaNAndZero(expr)
+ case _ if !needNormalize(expr.dataType) => expr
+
+ case a: Alias =>
Review comment:
A small refactor so that we can retain the alias when normalizing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]