GitHub user gatorsmile opened a pull request:

    https://github.com/apache/spark/pull/20591

    [SPARK-23390] [SQL] Add two extra constructors for ScalaUDF

    ## What changes were proposed in this pull request?
    
    In the last few releases, we changed the interface of `ScalaUDF`. 
Unfortunately, some Spark packages (e.g., spark-deep-learning) are using our 
internal class `ScalaUDF`. In the release 2.2 and 2.3, we added new parameters 
into these class. The users hit the binary compatibility issues and got the 
exception:
    
    ```
    > java.lang.NoSuchMethodError: 
org.apache.spark.sql.catalyst.expressions.ScalaUDF.<init>(Ljava/lang/Object;Lorg/apache/spark/sql/types/DataType;Lscala/collection/Seq;Lscala/collection/Seq;Lscala/Option;)V
    ```
    
    This PR is to improve the backward compatibility. However, we definitely 
should not encourage the external packages to use our internal classes. This 
might make us hard to maintain/develop the codes in Spark.
    
    ## How was this patch tested?
    N/A

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gatorsmile/spark scalaUDF

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/20591.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20591
    
----
commit 2b6be528f5a914dda2b33de269ab7b776a7766cd
Author: gatorsmile <gatorsmile@...>
Date:   2018-02-12T22:14:06Z

    fix.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to