You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Simeon H.K. Fitch (JIRA)" <ji...@apache.org> on 2018/06/25 14:31:00 UTC
[jira] [Created] (SPARK-24649) SparkUDF.unapply is not backwards
compatable
Simeon H.K. Fitch created SPARK-24649:
-----------------------------------------
Summary: SparkUDF.unapply is not backwards compatable
Key: SPARK-24649
URL: https://issues.apache.org/jira/browse/SPARK-24649
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 2.3.1, 2.3.0
Reporter: Simeon H.K. Fitch
The shape of the `ScalaUDF` case class changed in 2.3.0. A secondary constructor that's backwards compatible with 2.1.x and 2.2.x was provided, but a corresponding `unapply` method wasn't included. Therefore code such as the following that worked in 2.1.x and 2.2.x no longer compiles:
{code:java}
val ScalaUDF(function, dataType, children, inputTypes, udfName) = myUDF
{code}
Scala automatically generates an `unapply` method for the primary constructor of case classes in the companion object. An appropriate fix for this would to manually provide a secondary `unapply` method for the 2.2.x signature.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org