You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Andrew Lamb (Jira)" <ji...@apache.org> on 2020/12/14 18:48:00 UTC
[jira] [Resolved] (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 ]
Andrew Lamb resolved ARROW-9771.
--------------------------------
Fix Version/s: 3.0.0
Resolution: Fixed
Issue resolved by pull request 8903
[https://github.com/apache/arrow/pull/8903]
> [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
> Assignee: Jorge Leitão
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.0.0
>
> Time Spent: 1h 20m
> 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)