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

    https://github.com/apache/spark/pull/11565#discussion_r55642840
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
    @@ -384,9 +374,25 @@ object ColumnPruning extends Rule[LogicalPlan] {
         // Eliminate no-op Projects
         case p @ Project(projectList, child) if sameOutput(child.output, 
p.output) => child
     
    +    // Eliminate no-op Window
    +    case w: Window if sameOutput(w.child.output, w.output) => w.child
    +
    +    // Convert Aggregate to Project if no aggregate function exists
    +    case a: Aggregate if !containsAggregates(a.expressions) =>
    +      Project(a.aggregateExpressions, a.child)
    --- End diff --
    
    It only makes sense when the grouping and aggregateExpressions are exactly 
identical. 


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