Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2511#discussion_r18317624
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/SqlParser.scala ---
    @@ -166,7 +186,7 @@ class SqlParser extends StandardTokenParsers with 
PackratParsers {
             val withFilter = f.map(f => Filter(f, base)).getOrElse(base)
             val withProjection =
               g.map {g =>
    -            Aggregate(assignAliases(g), assignAliases(p), withFilter)
    +            Aggregate(assignAliasesForGroups(g,p), assignAliases(p), 
withFilter)
    --- End diff --
    
    A simpler solution is to just not assignAliases to the grouping expressions 
(I'm not sure why we are.  That is probably my mistake).  That change also 
seems to also make your test case pass.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to