Github user dilipbiswal commented on a diff in the pull request: https://github.com/apache/spark/pull/13045#discussion_r62964226 --- Diff: python/pyspark/sql/dataframe.py --- @@ -861,11 +861,11 @@ def groupBy(self, *cols): Each element should be a column name (string) or an expression (:class:`Column`). >>> df.groupBy().avg().collect() - [Row(avg(age)=3.5)] + [Row(avg_c1=3.5)] --- End diff -- @cloud-fan Actually, initially i had it scoped only to wrap the expression with UnresolvedAlias for TypedAggregateExpression. I then stumbled up on this [test](https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/parquetSuites.scala#L672-#L687). Wenchen, what do you think about the above test ? Basically this prompted me to widen the scope to generate simpler and shorter (i agree, its not better) for AggregateExpressions instead of limiting it to typed aggregates.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org