AngersZhuuuu commented on a change in pull request #33993:
URL: https://github.com/apache/spark/pull/33993#discussion_r709947109



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/util/SQLOpenHashSet.scala
##########
@@ -60,21 +60,52 @@ class SQLOpenHashSet[@specialized(Long, Int, Double, Float) 
T: ClassTag](
 }
 
 object SQLOpenHashSet {
-  def isNaN(dataType: DataType): Any => Boolean = {
+  def isNaNFuncAndValueNaN(dataType: DataType): (Any => Boolean, Any) = {
     dataType match {
       case DoubleType =>
-        (value: Any) => 
java.lang.Double.isNaN(value.asInstanceOf[java.lang.Double])
+        ((value: Any) => 
java.lang.Double.isNaN(value.asInstanceOf[java.lang.Double]),
+          java.lang.Double.NaN)
       case FloatType =>
-        (value: Any) => 
java.lang.Float.isNaN(value.asInstanceOf[java.lang.Float])
-      case _ => (_: Any) => false
+        ((value: Any) => 
java.lang.Float.isNaN(value.asInstanceOf[java.lang.Float]),
+          java.lang.Float.NaN)
+      case _ => ((_: Any) => false, null)
     }
   }
 
-  def valueNaN(dataType: DataType): Any = {
+  def isNaNFuncAndValueNaN(dataType: DataType, valueName: String): 
Option[(String, String)] = {

Review comment:
       Yea, Done




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to