Hello guys,

I want to group by certain column attributes (e.g.,List<Column >
groupByQidAttributes) a dataset (initDataset) and then count the
occurrences of associated grouped rows, how do i achieve that neatly?
I tried through the following code:
Dataset<Row> groupedRowsDF = initDataset.withColumn("qidsFreqs", count("*").
over(Window.partitionBy(groupByQidAttributes.toArray(new Column[
groupByQidAttributes.size()])))); Is that OK to use for the purpose?

Reply via email to