Using Spark DataFrame, eg.
myDf
.filter(col("timestamp").gt(15000))
.groupBy("groupingKey")
.agg(collect_list("aDoubleValue"))
I want the collect_list to return the result, but ordered according to "timestamp". Ia I want the GroupBy results to be sorted by another column.
I know there are other issues about it, but I couldn't find a reliable answer with DataFrame.
How can this be done? (the answer: sort the myDf by "timestamp" before the gorupBy is not good)
Thanks.