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

    https://github.com/apache/spark/pull/14912#discussion_r77472048
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala
 ---
    @@ -171,6 +172,27 @@ class FilterPushdownSuite extends PlanTest {
         comparePlans(optimized, correctAnswer)
       }
     
    +  test("push down filters that are combined") {
    +    // The following predicate ('a === 2 || 'a === 3) && ('c > 10 || 'a 
=== 2)
    +    // will be simplified as ('a == 2) || ('c > 10 && 'a == 3).
    +    // ('a === 2 || 'a === 3) can be pushed down. But the simplified one 
can't.
    --- End diff --
    
    Considering how the Optimizer works, we can't extract `CombineFilters` and 
`PushDownPredicates` as a new batch, as we should also respect the interaction 
between them and other rules. I do an alternative approach to convert 
predicates of filters to cnf during combining filters, and then perform 
additional predicate pushdown immediately. So the following 
BooleanSimplification will not affect the predicate pushdown.


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