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 2021/09/10 16:09:25 UTC

[GitHub] [spark] cfmcgrady commented on a change in pull request #33955: [SPARK-36702][SQL] ArrayUnion handle duplicated Double.NaN and Float.Nan

cfmcgrady commented on a change in pull request #33955:
URL: https://github.com/apache/spark/pull/33955#discussion_r706304078



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
##########
@@ -3550,6 +3551,10 @@ object ArrayBinaryLike {
   def throwUnionLengthOverflowException(length: Int): Unit = {
     throw QueryExecutionErrors.unionArrayWithElementsExceedLimitError(length)
   }
+
+  def isNaN(value: Any): Boolean = {
+    Double.NaN.equals(value) || Float.NaN.equals(value)

Review comment:
       Seems `Double.NaN.equals(value)` can't work with `Scala-2.13` together, we need use `java.lang.Double.isNaN()` instead.




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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