We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2245395 commit 01a51caCopy full SHA for 01a51ca
sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala
@@ -139,7 +139,8 @@ case class UserDefinedFunction protected[sql] (
139
object UserDefinedFunction {
140
// This is to keep backward compatibility for this case class.
141
// TODO: revisit this case class in Spark 3.0, and narrow down the public surface.
142
- def unapply(arg: UserDefinedFunction): Option[(AnyRef, DataType, Option[Seq[DataType]])] = {
143
- Some(arg.f, arg.dataType, arg.inputSchemas.map(_.map(_.dataType)))
+ def unapply(obj: Any): Option[(AnyRef, DataType, Option[Seq[DataType]])] = obj match {
+ case udf: UserDefinedFunction =>
144
+ Some((udf.f, udf.dataType, udf.inputSchemas.map(_.map(_.dataType))))
145
}
146
0 commit comments