Re: Serialization error - sql UDF related

2017-02-18 Thread Yong Zhang
d Boolean, which are serializable by default. So you can change the definition to function, instead of method, which should work. Yong From: Darshan Pandya <darshanpan...@gmail.com> Sent: Friday, February 17, 2017 10:36 PM To: user Subject: Serialization e

Re: Serialization error - sql UDF related

2017-02-17 Thread vaquar khan
Hi Darshan , When you get org.apache.spark.SparkException: Task not serializable exception, it means that you are using a reference to an instance of a non-serialize class inside a transformation. Hope following link will help.

Serialization error - sql UDF related

2017-02-17 Thread Darshan Pandya
Hello, I am getting the famous serialization exception on running some code as below, val correctColNameUDF = udf(getNewColumnName(_: String, false: Boolean): String); val charReference: DataFrame = thinLong.select("char_name_id", "char_name").withColumn("columnNameInDimTable",