I need to group the DataFrame by all columns except "tag"
Right now I can do it in the following way:
unionDf.groupBy("name", "email", "phone", "country").agg(collect_set("tag").alias("tags"))
Is it possible to get all columns(except "tag") and pass them to groupBy method without a need to hardcode them as I do it now - "name", "email", "phone", "country".
I tried unionDf.groupBy(unionDf.columns) but it doesn't work