I am trying to implement the collect_list
function is Spark.SQL.
The way to do it in PySpark via a dataframe is available here
I am trying to do the same thing via a SQL query.
I am trying to implement the collect_list
function is Spark.SQL.
The way to do it in PySpark via a dataframe is available here
I am trying to do the same thing via a SQL query.
It has little to do with pyspark or Spark with Scala.
Try this:
SELECT c1, collect_list(struct(c2, c3)) FROM tempview/table GROUP BY c1
or a variation based on your requirements.