You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/12/13 08:26:00 UTC
[jira] [Updated] (ARROW-9771) [Rust] [DataFusion] Predicate
Pushdown Improvement: treat predicates separated by AND separately
[ https://issues.apache.org/jira/browse/ARROW-9771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-9771:
----------------------------------
Labels: pull-request-available (was: )
> [Rust] [DataFusion] Predicate Pushdown Improvement: treat predicates separated by AND separately
> ------------------------------------------------------------------------------------------------
>
> Key: ARROW-9771
> URL: https://issues.apache.org/jira/browse/ARROW-9771
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Rust, Rust - DataFusion
> Reporter: Andrew Lamb
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> As discussed by [~jorgecarleitao] and [~houqp] here: https://github.com/apache/arrow/pull/7880#pullrequestreview-468057624
> If a predicate is a conjunction (aka AND'd) together, each of the clauses can be treated separately (e.g. a single filter expression {{A > 5 And B < 4}} can be broken up and each of {{A > 5}} and {{B < 4}} can be potentially pushed down different levels
> The filter pushdown logic works for the following case (when {{a}} and {{b}} are are separate selections, predicate for a is pushed below the {{Aggregate}} in the optimized plan):
> {code}
> ********Original plan:
> Selection: #b GtEq Int64(1)
> Selection: #a LtEq Int64(1)
> Aggregate: groupBy=[[#a]], aggr=[[MIN(#b)]]
> TableScan: test projection=None
> ********Optimized plan:
> Selection: #b GtEq Int64(1)
> Aggregate: groupBy=[[#a]], aggr=[[MIN(#b)]]
> Selection: #a LtEq Int64(1)
> TableScan: test projection=None
> {code}
> But not for this when {{a}} and {{b}} are {{AND}}'d together
> {code}
> ********Original plan:
> Selection: #a LtEq Int64(1) And #b GtEq Int64(1)
> Aggregate: groupBy=[[#a]], aggr=[[MIN(#b)]]
> TableScan: test projection=None
> ********Optimized plan:
> Selection: #a LtEq Int64(1) And #b GtEq Int64(1)
> Aggregate: groupBy=[[#a]], aggr=[[MIN(#b)]]
> TableScan: test projection=None
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)