标签: apache-spark apache-spark-sql
如何在可以接收Any类型的SQL表达式中创建要使用的UDF?
Any
类似的东西:
sqlContext.udf.register("myudf", (x: Any) => x)
抛出Schema for type Any is not supported
Schema for type Any is not supported
虽然这有效,但很明显:
sqlContext.udf.register("myudf", (x: String) => x)