Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/22319#discussion_r214659962 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala --- @@ -129,3 +135,12 @@ case class UserDefinedFunction protected[sql] ( } } } + +object UserDefinedFunction { + // This is to keep backward compatibility for this case class. + // TODO: revisit this case class in Spark 3.0, and narrow down the public surface. + def unapply(obj: Any): Option[(AnyRef, DataType, Option[Seq[DataType]])] = obj match { --- End diff -- Wenchen, can we have a small test to check if the previous pattern matching works or not, and can you double check this by resembling the case by `javap -v` manually at least since this looks not being checked?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org