Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22732#discussion_r225280125
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala
 ---
    @@ -73,27 +73,27 @@ case class UserDefinedFunction protected[sql] (
        */
       @scala.annotation.varargs
       def apply(exprs: Column*): Column = {
    -    if (inputTypes.isDefined && nullableTypes.isDefined) {
    -      require(inputTypes.get.length == nullableTypes.get.length)
    +    if (inputTypes.isDefined && handleNullForInputs.isDefined) {
    +      require(inputTypes.get.length == handleNullForInputs.get.length)
         }
     
         Column(ScalaUDF(
           f,
           dataType,
           exprs.map(_.expr),
    +      handleNullForInputs.getOrElse(exprs.map(_ => false)),
    --- End diff --
    
    If not specified, assume nothing needs special null handling. OK, check.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to