Can any please help to know how to pass the non dataframe value as an argument to udf.
val df2 = df1.withColumn("newcol", udffunc(df1("col1"), x)).
The udf function i defined as below.
udffunc = udf(method _)
Method i defined as below.
def method(inputvar1: String, inputvar2: String): Option[Long] = {
...
...
return Longvariable
}
:type udffunc?