We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4edc31 commit 09b3f77Copy full SHA for 09b3f77
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
@@ -146,6 +146,12 @@ trait CheckAnalysis {
146
s"data type.")
147
}
148
149
+ if (expr.isInstanceOf[AggregateExpression] || expr.isInstanceOf[AggregateFunction]) {
150
+ // Aggregate function in group by clause; this fails to execute
151
+ failAnalysis(s"aggregate expression ${expr.prettyString} should not " +
152
+ s"appear in grouping expression.")
153
+ }
154
+
155
if (!expr.deterministic) {
156
// This is just a sanity check, our analysis rule PullOutNondeterministic should
157
// already pull out those nondeterministic expressions and evaluate them in
0 commit comments