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

    https://github.com/apache/spark/pull/22732#discussion_r225602236
  
    --- 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 --
    
    I don't know of a case. I suppose that's fine default behavior, and matches 
what happened in the previous change.


---

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

Reply via email to