You are mixing strings with a column in the groupBy
. The window window($"EVENT_TIME", "60 minutes")
is correctly interpreted as a column but the list of column names needs to be columns to match, it’s not possible to mix types.
What you can do is:
val cols = groupCols.map(col) ++ Seq(window($"EVENT_TIME", "60 minutes"))
val aggDFrame = dframe.groupBy(cols: _*).agg(...)
CLICK HERE to find out more related problems solutions.