Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/23275#discussion_r240234583 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala --- @@ -88,68 +88,49 @@ sealed trait UserDefinedFunction { private[sql] case class SparkUserDefinedFunction( f: AnyRef, dataType: DataType, - inputTypes: Option[Seq[DataType]], - nullableTypes: Option[Seq[Boolean]], + inputSchemas: Seq[Option[ScalaReflection.Schema]], name: Option[String] = None, nullable: Boolean = true, deterministic: Boolean = true) extends UserDefinedFunction { @scala.annotation.varargs - override def apply(exprs: Column*): Column = { - // TODO: make sure this class is only instantiated through `SparkUserDefinedFunction.create()` - // and `nullableTypes` is always set. - if (inputTypes.isDefined) { - assert(inputTypes.get.length == nullableTypes.get.length) - } - - val inputsNullSafe = nullableTypes.getOrElse { - ScalaReflection.getParameterTypeNullability(f) --- End diff -- Not worth to keep it anymore, as Scala 2.12 is the default now.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org