Reputation: 553
I'd like to use the explode function on a DF, I just write the code like the document:
case class Url(url:String)
val temp3 = temp2.explode($"urls"){
case Row(urls:Array[String]) => urls.map(Url(_))
}
However , it came out:
error: not found: value Row
The DF temp2 is like:
temp2.printSchema()
root
|-- userid: string (nullable = true)
|-- urls: array (nullable = true)
| |-- element: string (containsNull = true)
Upvotes: 5
Views: 10161