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 15:33:00 UTC

[jira] [Updated] (SPARK-24649) SparkUDF.unapply is not backwards compatable

     [ https://issues.apache.org/jira/browse/SPARK-24649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simeon H.K. Fitch updated SPARK-24649:
--------------------------------------
    Description: 
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}


  was:
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.


> 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.0, 2.3.1
>            Reporter: Simeon H.K. Fitch
>            Priority: Major
>
> 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}



--
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