Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/21813#discussion_r203841560 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala --- @@ -442,17 +442,32 @@ class Analyzer( child: LogicalPlan): LogicalPlan = { val gid = AttributeReference(VirtualColumn.groupingIdName, IntegerType, false)() + val finalGroupByExpressions = if (groupByExprs == Nil) { --- End diff -- Shouldn't we do this in the branch of `case x: GroupingSets if x.expressions.forall(_.resolved) =>`? I think this `constructAggregate` method is also used by other clauses like `Cube` and `Rollup`.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org