public abstract class FilterJoinExcludePushToChildRule
extends org.apache.calcite.rel.rules.FilterJoinRule
FilterJoinRule. Specifically, this class contains a
subset of code from FilterJoinRule for the codepath involving FilterJoinRule.FILTER_ON_JOIN
Everything has been keep as-is from FilterJoinRule except for :
1. the modification of classifyFilters(List, JoinRelType, boolean, List) method called in the
perform(RelOptRuleCall, Filter, Join) method of this class.
2. removing redundant 'IS NOT NULL' filters from inner join filter condition
The classifyFilters(List, JoinRelType, boolean, List) method is based of RelOptUtil.classifyFilters(org.apache.calcite.rel.RelNode, java.util.List<org.apache.calcite.rex.RexNode>, org.apache.calcite.rel.core.JoinRelType, boolean, boolean, boolean, java.util.List<org.apache.calcite.rex.RexNode>, java.util.List<org.apache.calcite.rex.RexNode>, java.util.List<org.apache.calcite.rex.RexNode>).
The difference is that the modfied method use in thsi class will not not push filters to the children.
Hence, filters will either stay where they are or are pushed to the join (if they originated from above the join).
The modification of classifyFilters(List, JoinRelType, boolean, List) is needed due to the bug described in
https://github.com/apache/druid/pull/9773. This class and it's modification can be removed, switching back to the
default Rule provided in Calcite's FilterJoinRule when https://github.com/apache/druid/issues/9843 is resolved.| Modifier and Type | Class and Description |
|---|---|
static class |
FilterJoinExcludePushToChildRule.FilterIntoJoinExcludePushToChildRule
Rule that tries to push filter expressions into a join
condition.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.calcite.rel.rules.FilterJoinRule |
FILTER_ON_JOIN_EXCLUDE_PUSH_TO_CHILD
Rule that pushes predicates from a Filter into the Join below them.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
perform(org.apache.calcite.plan.RelOptRuleCall call,
org.apache.calcite.rel.core.Filter filter,
org.apache.calcite.rel.core.Join join)
Copied from
FilterJoinRule.perform(org.apache.calcite.plan.RelOptRuleCall, org.apache.calcite.rel.core.Filter, org.apache.calcite.rel.core.Join)
The difference is that this method will not not push filters to the children in classifyFilters |
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, unorderedpublic static final org.apache.calcite.rel.rules.FilterJoinRule FILTER_ON_JOIN_EXCLUDE_PUSH_TO_CHILD
FilterJoinRule.FILTER_ON_JOIN but does not push predicate to the childprotected void perform(org.apache.calcite.plan.RelOptRuleCall call,
org.apache.calcite.rel.core.Filter filter,
org.apache.calcite.rel.core.Join join)
FilterJoinRule.perform(org.apache.calcite.plan.RelOptRuleCall, org.apache.calcite.rel.core.Filter, org.apache.calcite.rel.core.Join)
The difference is that this method will not not push filters to the children in classifyFiltersperform in class org.apache.calcite.rel.rules.FilterJoinRuleCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.