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

    https://github.com/apache/spark/pull/10052#discussion_r46895432
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ---
    @@ -178,6 +179,27 @@ class Analyzer(
         }
       }
     
    +  /**
    +   * Replaces queries of the form "SELECT expr FROM A GROUP BY 1"
    +   * with a query of the form "SELECT expr FROM A GROUP BY expr"
    +   */
    +  object ResolveGroupByReferences extends Rule[LogicalPlan] {
    +
    +    def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
    +      case Aggregate(groups, aggs, child) =>
    +        Aggregate(groups.map(group => group match {
    --- End diff --
    
    Nit: would you mind assigning this to an intermediate variable.  this is a 
little hard to parse visually.


---
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