You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by kyunam <ky...@hotmail.com> on 2019/06/01 18:16:15 UTC

Possible to specify returnType: DataType in UDFRegistration.register()?

Scala API
<https://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.sql.UDFRegistration@register(name:String,f:org.apache.spark.sql.api.java.UDF2[_,_,_],returnType:org.apache.spark.sql.types.DataType):Unit>  
says that register(..) accepts returnType.But when I do and compile, I get
the following error.error: overloaded method value register with
alternatives:[ERROR]   (name: String,f:
org.apache.spark.sql.api.java.UDF22[_, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _],returnType:
org.apache.spark.sql.types.DataType)Unit [ERROR]   (name: String,f:
org.apache.spark.sql.api.java.UDF21[_, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _],returnType:
org.apache.spark.sql.types.DataType)Unit Why can't I pass in
returnType?Thanks,Kyunam



--
Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/