public class JoinProjectTransposeRule extends RelOptRule
Join one of whose inputs is a
LogicalProject, and
pulls the project up.
Projections are pulled up if the
LogicalProject doesn't originate from
a null generating input in an outer join.
| Modifier and Type | Field and Description |
|---|---|
static JoinProjectTransposeRule |
BOTH_PROJECT |
static JoinProjectTransposeRule |
LEFT_PROJECT |
static JoinProjectTransposeRule |
RIGHT_PROJECT |
description, operands| Constructor and Description |
|---|
JoinProjectTransposeRule(RelOptRuleOperand operand,
String description) |
JoinProjectTransposeRule(RelOptRuleOperand operand,
String description,
RelFactories.ProjectFactory pFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected RelNode |
getProjectChild(RelOptRuleCall call,
Project project,
boolean leftChild)
Returns the child of the project that will be used as input into the new
LogicalJoin once the projects are pulled above the LogicalJoin.
|
protected Project |
getRightChild(RelOptRuleCall call) |
protected boolean |
hasLeftChild(RelOptRuleCall call) |
protected boolean |
hasRightChild(RelOptRuleCall call) |
void |
onMatch(RelOptRuleCall call)
Receives notification about a rule match.
|
any, convert, convert, convertList, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, operand, operand, operand, operand, operand, some, toString, unorderedpublic static final JoinProjectTransposeRule BOTH_PROJECT
public static final JoinProjectTransposeRule LEFT_PROJECT
public static final JoinProjectTransposeRule RIGHT_PROJECT
public JoinProjectTransposeRule(RelOptRuleOperand operand, String description)
public JoinProjectTransposeRule(RelOptRuleOperand operand, String description, RelFactories.ProjectFactory pFactory)
public void onMatch(RelOptRuleCall call)
RelOptRulecall.rels holds the set of relational
expressions which match the operands to the rule;
call.rels[0] is the root expression.
Typically a rule would check that the nodes are valid matches, creates
a new expression, then calls back RelOptRuleCall.transformTo(org.apache.calcite.rel.RelNode, java.util.Map<org.apache.calcite.rel.RelNode, org.apache.calcite.rel.RelNode>) to
register the expression.
onMatch in class RelOptRulecall - Rule callRelOptRule.matches(RelOptRuleCall)protected boolean hasLeftChild(RelOptRuleCall call)
call - RelOptRuleCallprotected boolean hasRightChild(RelOptRuleCall call)
call - RelOptRuleCallprotected Project getRightChild(RelOptRuleCall call)
call - RelOptRuleCallprotected RelNode getProjectChild(RelOptRuleCall call, Project project, boolean leftChild)
call - RelOptRuleCallproject - project RelNodeleftChild - true if the project corresponds to the left projectionCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.