This answers exactly what you are looking for -
http://stackoverflow.com/a/34204640/1562474
On Tue, Jul 12, 2016 at 6:40 AM, Pedro Rodriguez
wrote:
> Is it possible with Spark SQL to merge columns whose types are Arrays or
> Sets?
>
> My use case would be something
Is it possible with Spark SQL to merge columns whose types are Arrays or
Sets?
My use case would be something like this:
DF types
id: String
words: Array[String]
I would want to do something like
df.groupBy('id).agg(merge_arrays('words)) -> list of all words