In my project I got a column after applying collect_list aggregate function, which is of format wrappedArray , I wanted to know is there anyway to convert that wrappedArray to normal array or list So that I can iterate over that column and extract values row by row in that column?
Language:- JAVA Using Apache spark library
By this I am getting that column which is of wrappedArray type
dataset.groupBy( "department","salary","tag")
.agg(collect_list(col("id")));
dataset.foreach(row ->
row.getAs("id)")
);
I am confused how should I proceed further to iterate in that column.