maryannxue commented on a change in pull request #23712: [SPARK-26798][SQL] 
HandleNullInputsForUDF should trust nullability
URL: https://github.com/apache/spark/pull/23712#discussion_r255804674
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala
 ##########
 @@ -31,9 +31,9 @@ import org.apache.spark.sql.types.{AbstractDataType, 
DataType}
  *                  null. Use boxed type or [[Option]] if you wanna do the 
null-handling yourself.
  * @param dataType  Return type of function.
  * @param children  The input expressions of this UDF.
- * @param inputsNullSafe Whether the inputs are of non-primitive types or not 
nullable. Null values
- *                       of Scala primitive types will be converted to the 
type's default value and
- *                       lead to wrong results, thus need special handling 
before calling the UDF.
+ * @param inputPrimitives Whether the inputs are of primitive types. Null 
values of Java primitive
 
 Review comment:
   => 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.

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

Reply via email to