import org.apache.spark.sql.functions.udf
val upper: String => String = _.toUpperCase
val upperUDF = udf(upper)
scala> dataset.withColumn("upper", upperUDF('text)).show
看udf的代碼沒看懂, 誰能講講嗎?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/232173.html
標籤:其他開發語言
上一篇:pytest運行報錯:FileNotFoundError: [Errno 2] No such file or directory: 'nul'
