C - Configuration typepublic abstract class FilterJoinRule<C extends FilterJoinRule.Config> extends RelRule<C> implements TransformationRule
| Modifier and Type | Class and Description |
|---|---|
static interface |
FilterJoinRule.Config
Rule configuration.
|
static class |
FilterJoinRule.FilterIntoJoinRule
Rule that tries to push filter expressions into a join
condition and into the inputs of the join.
|
static class |
FilterJoinRule.JoinConditionPushRule
Rule that pushes parts of the join condition to its inputs.
|
static interface |
FilterJoinRule.Predicate
Predicate that returns whether a filter is valid in the ON clause of a
join for this particular kind of join.
|
RelRule.Done, RelRule.MatchHandler<R extends RelOptRule>, RelRule.OperandBuilder, RelRule.OperandDetailBuilder<R extends RelNode>, RelRule.OperandTransformRelOptRule.ConverterRelOptRuleOperand| Modifier and Type | Field and Description |
|---|---|
static FilterJoinRule.Predicate |
TRUE_PREDICATE
Deprecated.
|
description, operands, relBuilderFactory| Modifier | Constructor and Description |
|---|---|
protected |
FilterJoinRule(C config)
Creates a FilterJoinRule.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<RexNode> |
inferJoinEqualConditions(List<RexNode> rexNodes,
Join join)
Infers more equal conditions for the join condition.
|
protected void |
perform(RelOptRuleCall call,
@Nullable Filter filter,
Join join) |
protected void |
validateJoinFilters(List<RexNode> aboveFilters,
List<RexNode> joinFilters,
Join join,
JoinRelType joinType)
Validates that target execution framework can satisfy join filters.
|
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, onMatch, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered@Deprecated public static final FilterJoinRule.Predicate TRUE_PREDICATE
protected FilterJoinRule(C config)
protected void perform(RelOptRuleCall call, @Nullable Filter filter, Join join)
protected List<RexNode> inferJoinEqualConditions(List<RexNode> rexNodes, Join join)
For example, in SELECT * FROM T1, T2, T3 WHERE T1.id = T3.id AND T2.id = T3.id,
we can infer T1.id = T2.id for the first Join node from second Join node's condition:
T1.id = T3.id AND T2.id = T3.id.
For the above SQL, the second Join's condition is T1.id = T3.id AND T2.id = T3.id.
After inference, the final condition would be: T1.id = T2.id AND T1.id = T3.id, the
T1.id = T2.id can be further pushed into LHS.
rexNodes - the Join conditionjoin - the Join nodeprotected void validateJoinFilters(List<RexNode> aboveFilters, List<RexNode> joinFilters, Join join, JoinRelType joinType)
If the join filter cannot be satisfied (for example, if it is
l.c1 > r.c2 and the join only supports equi-join), removes the
filter from joinFilters and adds it to aboveFilters.
The default implementation does nothing; i.e. the join can handle all conditions.
aboveFilters - Filter above JoinjoinFilters - Filters in join conditionjoin - JoinjoinType - JoinRelType could be different from type in Join due to
outer join simplification.Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.