Takeshi Yamamuro created SPARK-6379:
---------------------------------------
Summary: Support an implicit conversion from udf"name" to an UDF
defined in SQLContext
Key: SPARK-6379
URL: https://issues.apache.org/jira/browse/SPARK-6379
Project: Spark
Issue Type: Improvement
Components: SQL
Reporter: Takeshi Yamamuro
This is useful for using pre-defined UDFs in SQLContext;
val df = Seq(("id1", 1), ("id2", 4), ("id3", 5)).toDF("id", "value")
df.sqlContext.udf.register("simpleUdf", (v: Int) => v * v)
df.select($"id", udf"simpleUdf"($"value"))
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]