spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-26216) Do not use case class as public API (ScalaUDF)
Date Wed, 19 Dec 2018 15:21:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-26216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16725099#comment-16725099
] 

ASF GitHub Bot commented on SPARK-26216:
----------------------------------------

cloud-fan opened a new pull request #23351: [SPARK-26216][SQL][followup] use abstract class
instead of trait for UserDefinedFunction
URL: https://github.com/apache/spark/pull/23351
 
 
   ## What changes were proposed in this pull request?
   
   A followup of https://github.com/apache/spark/pull/23178 , to keep binary compability by
using abstract class.
   
   ## How was this patch tested?
   
   Manual test. I created a simple app with Spark 2.4
   ```
   object TryUDF {
     def main(args: Array[String]): Unit = {
       val spark = SparkSession.builder().appName("test").master("local[*]").getOrCreate()
       import spark.implicits._
       val f1 = udf((i: Int) => i + 1)
       spark.range(10).select(f1($"id")).show()
       spark.stop()
     }
   }
   ```
   
   When I run it with current master, it fails with
   ```
   java.lang.IncompatibleClassChangeError: Found interface org.apache.spark.sql.expressions.UserDefinedFunction,
but class was expected
   ```
   
   When I run it with this PR, it works
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Do not use case class as public API (ScalaUDF)
> ----------------------------------------------
>
>                 Key: SPARK-26216
>                 URL: https://issues.apache.org/jira/browse/SPARK-26216
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Wenchen Fan
>            Assignee: Wenchen Fan
>            Priority: Major
>              Labels: release-notes
>             Fix For: 3.0.0
>
>




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


Mime
View raw message