spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <ja...@japila.pl>
Subject Re: write and call UDF in spark dataframe
Date Thu, 21 Jul 2016 07:11:20 GMT
On Thu, Jul 21, 2016 at 4:53 AM, Divya Gehlot <divya.htconex@gmail.com> wrote:

> To be very specific I am looking for UDFs syntax for example which takes
> String as parameter and returns integer .. how do we define the return type

val f: String => Int = ???
val myUDF = udf(f)

or

val myUDF = udf[String, Int] { ??? }

or

val myUDF = udf { (s: String) => ??? }

Jacek

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org


Mime
View raw message