itholic commented on code in PR #39061:
URL: https://github.com/apache/spark/pull/39061#discussion_r1050278763
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala:
##########
@@ -397,16 +397,10 @@ trait CheckAnalysis extends PredicateHelper with
LookupCatalog with QueryErrorsB
messageParameters = Map("sqlExpr" -> expr.sql))
}
}
- case e: Attribute if groupingExprs.isEmpty =>
- // Collect all [[AggregateExpressions]]s.
- val aggExprs = aggregateExprs.filter(_.collect {
- case a: AggregateExpression => a
- }.nonEmpty)
- e.failAnalysis(
- errorClass = "_LEGACY_ERROR_TEMP_2422",
- messageParameters = Map(
- "sqlExpr" -> e.sql,
- "aggExprs" -> aggExprs.map(_.sql).mkString("(", ", ",
")")))
+ case _: Attribute if groupingExprs.isEmpty =>
+ operator.failAnalysis(
+ errorClass = "MISSING_GROUP_BY",
+ messageParameters = Map.empty)
Review Comment:
nit: can we clarify the type with `Map.empty[String, String]` To explicitly
tell which types can come ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]