I am trying to utilize Scala udfs from pyspark and running into 'pyspark.sql.utils.AnalysisException: UDF class doesn't implement any UDF interface' error
My scala code looks something like this
package com.spark.udfexample
Object test{
case class (a: Option[String], b: Option[String])
val foo: StructType = new StructType().add("a", StringType).add("b", StringType)
def udf1:UserDefinedFunction = udf((param: String, param: Seq[Row])) {
...
...
}
..
.
}
I am packing this object class as jar and passing to pyspark context.
spark.udf.registerJavaFunction("udf1", "com.spark.udfexample.test") - running into the error here, can someone help? thx