GitHub user sameeragarwal opened a pull request:

    https://github.com/apache/spark/pull/11670

    [SPARK-XXXX][SQL] Remove redundant conditions while combining filters

    ## What changes were proposed in this pull request?
    
    **[I'll link it to the JIRA once ASF JIRA is back online]**
    
    This PR modifies the existing `CombineFilters` rule to remove redundant 
conditions while combining individual filter predicates. For instance, queries 
of the form `table.where('a === 1 && 'b === 1).where('a === 1 && 'c === 1)` 
will now be equivalent to ` table.where('a === 1 && 'b === 1 && 'c === 1)` 
(instead of ` table.where('a === 1 && 'a === 1 && 'b === 1 && 'c === 1)`)
    
    ## How was this patch tested?
    
    Unit test in `FilterPushdownSuite`

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sameeragarwal/spark combine-filters

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/11670.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11670
    
----
commit c78166de38f48b11f8e3dc328c95f80451206f7c
Author: Sameer Agarwal <[email protected]>
Date:   2016-03-12T00:25:35Z

    Remove redundant conditions while combining filters

commit e946c1ef3aac0ae251fc47a4a07c023cfd8774b7
Author: Sameer Agarwal <[email protected]>
Date:   2016-03-12T00:40:56Z

    unit tests

----


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