Class DruidJoinRule
java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.druid.sql.calcite.rule.DruidJoinRule
public class DruidJoinRule
extends org.apache.calcite.plan.RelOptRule
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.calcite.plan.RelOptRule
org.apache.calcite.plan.RelOptRule.ConverterRelOptRuleOperand -
Field Summary
Fields inherited from class org.apache.calcite.plan.RelOptRule
description, operands, relBuilderFactory -
Method Summary
Modifier and TypeMethodDescriptionanalyzeCondition(org.apache.calcite.rex.RexNode condition, org.apache.calcite.rel.type.RelDataType leftRowType, org.apache.calcite.rex.RexBuilder rexBuilder) If this condition is an AND of some combination of (1) literals; (2) equality conditions of the form (3) unsupported conditionsbooleancanHandleCondition(org.apache.calcite.rex.RexNode condition, org.apache.calcite.rel.type.RelDataType leftRowType, DruidRel<?> right, org.apache.calcite.rel.core.JoinRelType joinType, List<org.apache.calcite.rel.type.RelDataTypeField> systemFieldList, org.apache.calcite.rex.RexBuilder rexBuilder) Returns whether we can handle the join condition.static DruidJoinRuleinstance(PlannerContext plannerContext) booleanmatches(org.apache.calcite.plan.RelOptRuleCall call) voidonMatch(org.apache.calcite.plan.RelOptRuleCall call) Methods inherited from class org.apache.calcite.plan.RelOptRule
any, convert, convert, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
-
Method Details
-
instance
-
matches
public boolean matches(org.apache.calcite.plan.RelOptRuleCall call) - Overrides:
matchesin classorg.apache.calcite.plan.RelOptRule
-
onMatch
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call) - Specified by:
onMatchin classorg.apache.calcite.plan.RelOptRule
-
canHandleCondition
public boolean canHandleCondition(org.apache.calcite.rex.RexNode condition, org.apache.calcite.rel.type.RelDataType leftRowType, DruidRel<?> right, org.apache.calcite.rel.core.JoinRelType joinType, List<org.apache.calcite.rel.type.RelDataTypeField> systemFieldList, org.apache.calcite.rex.RexBuilder rexBuilder) Returns whether we can handle the join condition. In case, some conditions in an AND expression are not supported, they are extracted into a post-join filter instead. -
analyzeCondition
public static DruidJoinRule.ConditionAnalysis analyzeCondition(org.apache.calcite.rex.RexNode condition, org.apache.calcite.rel.type.RelDataType leftRowType, org.apache.calcite.rex.RexBuilder rexBuilder) If this condition is an AND of some combination of (1) literals; (2) equality conditions of the form (3) unsupported conditionsReturns empty if the join cannot be supported at all. It can return non-empty with some unsupported conditions that can be extracted into post join filter.
f(LeftRel) = RightColumn, then return aDruidJoinRule.ConditionAnalysis.
-