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

    https://github.com/apache/spark/pull/8742#discussion_r39815622
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
    @@ -136,26 +136,12 @@ object SetOperationPushDown extends Rule[LogicalPlan] 
{
             Filter(condition, left),
             Filter(pushToRight(condition, rewrites), right))
     
    -    // Push down projection into intersect
    -    case Project(projectList, i @ Intersect(left, right)) =>
    -      val rewrites = buildRewrites(i)
    -      Intersect(
    -        Project(projectList, left),
    -        Project(projectList.map(pushToRight(_, rewrites)), right))
    -
         // Push down filter into except
         case Filter(condition, e @ Except(left, right)) =>
           val rewrites = buildRewrites(e)
           Except(
             Filter(condition, left),
             Filter(pushToRight(condition, rewrites), right))
    -
    -    // Push down projection into except
    -    case Project(projectList, e @ Except(left, right)) =>
    -      val rewrites = buildRewrites(e)
    -      Except(
    -        Project(projectList, left),
    -        Project(projectList.map(pushToRight(_, rewrites)), right))
    --- End diff --
    
    Can you add comments at here the reason that we cannot pushdown projections 
and why we can pushdown filters?


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