static class RelMdPredicates.JoinConditionBasedPredicateInference extends Object
Contract is:
Join and
optional predicates applicable on its left and right subtrees.
So for:
R1(x) join R2(y) on x = y' a call for
equivalentPredicates on 'x > 7' will return '
[y > 7]'
R1(x) join R2(y) on x = y join R3(z) on y = z' a call for
equivalentPredicates on the second join 'x > 7' will return
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
RelMdPredicates.JoinConditionBasedPredicateInference.EquivalenceFinder
Find expressions of the form 'col_x = col_y'.
|
(package private) class |
RelMdPredicates.JoinConditionBasedPredicateInference.ExprsItr
Given an expression returns all the possible substitutions.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) Set<String> |
allExprsDigests |
(package private) ImmutableBitSet |
allFieldsBitSet |
(package private) Set<String> |
equalityPredicates |
(package private) SortedMap<Integer,BitSet> |
equivalence |
(package private) Map<String,ImmutableBitSet> |
exprFields |
(package private) boolean |
isSemiJoin |
(package private) Join |
joinRel |
(package private) RexNode |
leftChildPredicates |
(package private) ImmutableBitSet |
leftFieldsBitSet |
(package private) int |
nFieldsLeft |
(package private) int |
nFieldsRight |
(package private) int |
nSysFields |
(package private) RexNode |
rightChildPredicates |
(package private) ImmutableBitSet |
rightFieldsBitSet |
| Modifier | Constructor and Description |
|---|---|
private |
JoinConditionBasedPredicateInference(Join joinRel,
boolean isSemiJoin,
RexNode lPreds,
RexNode rPreds) |
(package private) |
JoinConditionBasedPredicateInference(Join joinRel,
RexNode lPreds,
RexNode rPreds) |
| Modifier and Type | Method and Description |
|---|---|
(package private) RexNode |
compose(RexBuilder rexBuilder,
Iterable<RexNode> exprs) |
private void |
equivalent(int p1,
int p2) |
private void |
infer(RexNode predicates,
Set<String> allExprsDigests,
List<RexNode> inferedPredicates,
boolean includeEqualityInference,
ImmutableBitSet inferringFields) |
RelOptPredicateList |
inferPredicates(boolean includeEqualityInference)
The PullUp Strategy is sound but not complete.
|
private boolean |
isAlwaysTrue(RexNode predicate) |
RexNode |
left() |
(package private) Iterable<Mapping> |
mappings(RexNode predicate) |
private int |
pos(RexNode expr) |
RexNode |
right() |
final Join joinRel
final boolean isSemiJoin
final int nSysFields
final int nFieldsLeft
final int nFieldsRight
final ImmutableBitSet leftFieldsBitSet
final ImmutableBitSet rightFieldsBitSet
final ImmutableBitSet allFieldsBitSet
final Map<String,ImmutableBitSet> exprFields
final RexNode leftChildPredicates
final RexNode rightChildPredicates
JoinConditionBasedPredicateInference(Join joinRel, RexNode lPreds, RexNode rPreds)
public RelOptPredicateList inferPredicates(boolean includeEqualityInference)
public RexNode left()
public RexNode right()
private void infer(RexNode predicates, Set<String> allExprsDigests, List<RexNode> inferedPredicates, boolean includeEqualityInference, ImmutableBitSet inferringFields)
private void equivalent(int p1,
int p2)
RexNode compose(RexBuilder rexBuilder, Iterable<RexNode> exprs)
private int pos(RexNode expr)
private boolean isAlwaysTrue(RexNode predicate)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.