On Thu, Jul 21, 2016 at 5:53 AM, Mich Talebzadeh
<[email protected]> wrote:
> something similar
Is this going to be in Scala?
> def ChangeToDate (word : String) : Date = {
> //return
> TO_DATE(FROM_UNIXTIME(UNIX_TIMESTAMP(word,"dd/MM/yyyy"),"yyyy-MM-dd"))
> val d1 = Date.valueOf(ReverseDate(word))
> return d1
> }
> sqlContext.udf.register("ChangeToDate", ChangeToDate(_:String))
then...please use lowercase method names and *no* return please ;-)
BTW, no sqlContext as of Spark 2.0. Sorry.../me smiling nicely
Jacek
---------------------------------------------------------------------
To unsubscribe e-mail: [email protected]