Github user maryannxue commented on a diff in the pull request: https://github.com/apache/spark/pull/22732#discussion_r226156109 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala --- @@ -73,19 +73,21 @@ 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) + val numOfArgs = ScalaReflection.getParameterCount(f) --- End diff -- Actually I think the "assert" should better be in `ScalaUDF`, but then it would be slightly different from the current behavior whatsoever. I'm keeping other things as they are.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org