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

    https://github.com/apache/spark/pull/11828#discussion_r56934685
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
    @@ -305,21 +305,21 @@ object SetOperationPushDown extends Rule[LogicalPlan] 
with PredicateHelper {
     }
     
     /**
    - * Attempts to eliminate the reading of unneeded columns from the query 
plan using the following
    - * transformations:
    + * Attempts to eliminate the reading of unneeded columns from the query 
plan.
      *
    - *  - Inserting Projections beneath the following operators:
    - *   - Aggregate
    - *   - Generate
    - *   - Project <- Join
    - *   - LeftSemiJoin
    + * Since adding Project before Filter conflicts with 
PushPredicatesThroughProject, this rule will
    + * remove the Project p2 in the following pattern:
    + *
    + *   p1 @ Project(_, Filter(_, p2 @ Project(_, child))) if 
p2.outputSet.subsetOf(p2.inputSet)
    --- End diff --
    
    We need to insert the p2 to pruning the columns further, for example 
Project(Filter(Join)), we need p2 to prune the columns from Join.


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