public class RelMdPredicates extends Object
This is currently used by
JoinPushTransitivePredicatesRule to
infer Predicates that can be inferred from one side of a Join
to the other.
The PullUp Strategy is sound but not complete. Here are some of the limitations:
select a, max(b) from R1 where b > 7 → max(b) > 7 or max(b) is null
select a from R1 where a > 7 → "a > 7" is pulled up from the Projection. select a + 1 from R1 where a + 1 > 7 → "a + 1 gt; 7" is not pulled up
| Modifier and Type | Field and Description |
|---|---|
static RelMetadataProvider |
SOURCE |
| Constructor and Description |
|---|
RelMdPredicates() |
| Modifier and Type | Method and Description |
|---|---|
RelOptPredicateList |
getPredicates(Aggregate agg)
Infers predicates for an Aggregate.
|
RelOptPredicateList |
getPredicates(Exchange exchange)
Infers predicates for an Exchange.
|
RelOptPredicateList |
getPredicates(Filter filter)
Add the Filter condition to the pulledPredicates list from the child.
|
RelOptPredicateList |
getPredicates(Join join)
Infers predicates for a
Join. |
RelOptPredicateList |
getPredicates(Project project)
Infers predicates for a project.
|
RelOptPredicateList |
getPredicates(RelNode rel) |
RelOptPredicateList |
getPredicates(SemiJoin semiJoin)
Infers predicates for a
SemiJoin. |
RelOptPredicateList |
getPredicates(Sort sort)
Infers predicates for a Sort.
|
RelOptPredicateList |
getPredicates(TableScan table)
Infers predicates for a table scan.
|
RelOptPredicateList |
getPredicates(Union union)
Infers predicates for a Union.
|
public static final RelMetadataProvider SOURCE
public RelOptPredicateList getPredicates(RelNode rel)
public RelOptPredicateList getPredicates(TableScan table)
public RelOptPredicateList getPredicates(Project project)
childPullUpExprs: {a > 7, b + c < 10, a + e = 9}
projectionExprs: {a, b, c, e / 2}
projectionPullupExprs: {a > 7, b + c < 10}
public RelOptPredicateList getPredicates(Filter filter)
public RelOptPredicateList getPredicates(SemiJoin semiJoin)
SemiJoin.public RelOptPredicateList getPredicates(Join join)
Join.public RelOptPredicateList getPredicates(Aggregate agg)
Pulls up predicates that only contains references to columns in the GroupSet. For e.g.
childPullUpExprs : { a > 7, b + c < 10, a + e = 9}
groupSet : { a, b}
pulledUpExprs : { a > 7}
public RelOptPredicateList getPredicates(Union union)
The pulled up expression is a disjunction of its children's predicates.
public RelOptPredicateList getPredicates(Sort sort)
public RelOptPredicateList getPredicates(Exchange exchange)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.