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 827873f commit 1ebbb59Copy full SHA for 1ebbb59
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
@@ -209,9 +209,9 @@ class Analyzer(
209
// find all of the non-attribute expressions in the GROUP BY keys
210
val nonAttributeGroupByExpressions = new ArrayBuffer[Alias]()
211
212
- // The pair of (the non-attributes expression, associated attribute (alias))
+ // The pair of (the original GROUP BY key, associated attribute)
213
val groupByExprPairs = x.groupByExprs.map(_ match {
214
- case e: NamedExpression => (e, e)
+ case e: NamedExpression => (e, e.toAttribute)
215
case other => {
216
val alias = Alias(other, other.toString)()
217
nonAttributeGroupByExpressions += alias // add the non-attributes expression alias
0 commit comments