public class RelMdPredicates extends Object implements MetadataHandler<BuiltInMetadata.Predicates>
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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerMethodspublic static final RelMetadataProvider SOURCE
public MetadataDef<BuiltInMetadata.Predicates> getDef()
getDef in interface MetadataHandler<BuiltInMetadata.Predicates>public RelOptPredicateList getPredicates(RelNode rel, RelMetadataQuery mq)
BuiltInMetadata.Predicates.getPredicates(),
invoked using reflection.public RelOptPredicateList getPredicates(TableScan scan, RelMetadataQuery mq)
public RelOptPredicateList getPredicates(Project project, RelMetadataQuery mq)
inputPullUpExprs: {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, RelMetadataQuery mq)
public RelOptPredicateList getPredicates(Join join, RelMetadataQuery mq)
Join (including
SemiJoin).public RelOptPredicateList getPredicates(Aggregate agg, RelMetadataQuery mq)
Pulls up predicates that only contains references to columns in the GroupSet. For e.g.
inputPullUpExprs : { a > 7, b + c < 10, a + e = 9}
groupSet : { a, b}
pulledUpExprs : { a > 7}
public RelOptPredicateList getPredicates(Union union, RelMetadataQuery mq)
public RelOptPredicateList getPredicates(Intersect intersect, RelMetadataQuery mq)
public RelOptPredicateList getPredicates(Minus minus, RelMetadataQuery mq)
public RelOptPredicateList getPredicates(Sort sort, RelMetadataQuery mq)
public RelOptPredicateList getPredicates(TableModify tableModify, RelMetadataQuery mq)
public RelOptPredicateList getPredicates(Exchange exchange, RelMetadataQuery mq)
public RelOptPredicateList getPredicates(RelSubset r, RelMetadataQuery mq)
BuiltInMetadata.Predicates.getPredicates()
statistic.Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.