Github user gatorsmile commented on the issue:
https://github.com/apache/spark/pull/13483
@viirya Based on my understanding, we want to avoid having duplicate output
columns generated by our APIs. If users want to explicitly have two duplicate
output columns, they can specify them in `agg`. That For example,
```Scala
df.groupBy("col1").agg($"col1", $"col1", count("*"))
```
In addition, `spark.sql.retainGroupColumns` is an internal parameter. The
default value is `true`. That means, users might not realize they can disable
it. Thus, it makes more sense to avoid generating duplicate columns that are
caused by retaining group-by expressions.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]