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/10/12 02:45:17 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #29983: [SPARK-13860][SQL] Change CentralMomentAgg to return null instead of Double.NaN when divideByZero

HyukjinKwon commented on a change in pull request #29983:
URL: https://github.com/apache/spark/pull/29983#discussion_r503011445



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2342,6 +2342,16 @@ object SQLConf {
       .booleanConf
       .createWithDefault(false)
 
+  val LEGACY_CENTRAL_MOMENT_AGG =
+    buildConf("spark.sql.legacy.centralMomentAgg")
+      .internal()
+      .doc("When set to true, central moment aggregation will return Double.NaN " +
+        "if divide by zero occurred during calculation. Otherwise, it will return null. " +
+        "Before version 3.1.0, it returns NaN in divideByZero case by default.")

Review comment:
       Shall we update migration guide (https://github.com/apache/spark/blob/master/docs/sql-migration-guide.md) too? Looks like it's more a behaviour change instead of a big fix.




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