How to convert rows into string values in Apache Spark
I have a spark dataframe like this:
fruit | name
--------------
fruit | apple
fruit | orange
fruit | mango
I want to convert it into this:
fruit | string
----------------------------
fruit | apple, orange, mango
How can I achieve this in Apache Spark?