cloud-fan commented on a change in pull request #27937: [SPARK-30127][SQL] 
Support case class parameter for typed Scala UDF
URL: https://github.com/apache/spark/pull/27937#discussion_r396265521
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala
 ##########
 @@ -59,14 +56,75 @@ case class ScalaUDF(
 
   override def toString: String = 
s"${udfName.getOrElse("UDF")}(${children.mkString(", ")})"
 
+  /**
+   * The analyzer should be aware of Scala primitive types so as to make the
+   * UDF return null if there is any null input value of these types. On the
+   * other hand, Java UDFs can only have boxed types, thus this parameter will
+   * always be all false.
 
 Review comment:
   We need to make sure the comment is accurate. `Java UDFs can only have boxed 
types, thus this parameter will always be all false.` This is wrong now.
   
   I agree that `Nil` is fine in this case, but the comment needs to be updated.

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