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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to