public abstract class FilterJoinRule extends RelOptRule
Modifier and Type | Class and Description |
---|---|
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.
|
Modifier and Type | Field and Description |
---|---|
static FilterJoinRule |
DUMB_FILTER_ON_JOIN
Dumber version of
FILTER_ON_JOIN . |
static FilterJoinRule |
FILTER_ON_JOIN
Rule that pushes predicates from a Filter into the Join below them.
|
static FilterJoinRule |
JOIN
Rule that pushes predicates in a Join into the inputs to the join.
|
private FilterJoinRule.Predicate |
predicate
Predicate that returns whether a filter is valid in the ON clause of a
join for this particular kind of join.
|
private boolean |
smart
Whether to try to strengthen join-type.
|
static FilterJoinRule.Predicate |
TRUE_PREDICATE
Predicate that always returns true.
|
description, operands, relBuilderFactory
Modifier | Constructor and Description |
---|---|
protected |
FilterJoinRule(RelOptRuleOperand operand,
java.lang.String id,
boolean smart,
RelBuilderFactory relBuilderFactory,
FilterJoinRule.Predicate predicate)
Creates a FilterJoinRule with an explicit root operand and
factories.
|
protected |
FilterJoinRule(RelOptRuleOperand operand,
java.lang.String id,
boolean smart,
RelFactories.FilterFactory filterFactory,
RelFactories.ProjectFactory projectFactory)
Deprecated.
|
protected |
FilterJoinRule(RelOptRuleOperand operand,
java.lang.String id,
boolean smart,
RelFactories.FilterFactory filterFactory,
RelFactories.ProjectFactory projectFactory,
FilterJoinRule.Predicate predicate)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
needsPushInto(Join join)
Returns if it is needed to push the filter condition above join
into the join condition.
|
protected void |
perform(RelOptRuleCall call,
Filter filter,
Join join) |
protected void |
validateJoinFilters(java.util.List<RexNode> aboveFilters,
java.util.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
public static final FilterJoinRule.Predicate TRUE_PREDICATE
public static final FilterJoinRule FILTER_ON_JOIN
public static final FilterJoinRule DUMB_FILTER_ON_JOIN
FILTER_ON_JOIN
. Not intended for production
use, but keeps some tests working for which FILTER_ON_JOIN
is too
smart.public static final FilterJoinRule JOIN
private final boolean smart
private final FilterJoinRule.Predicate predicate
protected FilterJoinRule(RelOptRuleOperand operand, java.lang.String id, boolean smart, RelBuilderFactory relBuilderFactory, FilterJoinRule.Predicate predicate)
@Deprecated protected FilterJoinRule(RelOptRuleOperand operand, java.lang.String id, boolean smart, RelFactories.FilterFactory filterFactory, RelFactories.ProjectFactory projectFactory)
@Deprecated protected FilterJoinRule(RelOptRuleOperand operand, java.lang.String id, boolean smart, RelFactories.FilterFactory filterFactory, RelFactories.ProjectFactory projectFactory, FilterJoinRule.Predicate predicate)
private boolean needsPushInto(Join join)
protected void perform(RelOptRuleCall call, Filter filter, Join join)
protected void validateJoinFilters(java.util.List<RexNode> aboveFilters, java.util.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–2019 The Apache Software Foundation. All rights reserved.