Home > other >  Saprk udf is how to convert the Column into type String
Saprk udf is how to convert the Column into type String

Time:12-10


The import org. Apache. Spark. SQL. Functions provides the udf

Val upper: String=& gt; String=_. ToUpperCase



Val upperUDF=udf (upper)


Scala> The dataset. WithColumn (" upper ", upperUDF (' text)). The show


The udf code didn't understand, who can tell me?
  • Related