udf No TypeTag available for type string
问题 I don't understand a behavior of spark. I create an udf wich return an Integer like below import org.apache.spark.sql.SQLContext import org.apache.spark.{SparkConf, SparkContext} object Show { def main(args: Array[String]): Unit = { val (sc,sqlContext) = iniSparkConf("test") val testInt_udf = sqlContext.udf.register("testInt_udf", testInt _) } def iniSparkConf(appName: String): (SparkContext, SQLContext) = { val conf = new SparkConf().setAppName(appName)//.setExecutorEnv("spark.ui.port",