|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.relopt.RelOptRuleCall
public abstract class RelOptRuleCall
A RelOptRuleCall
is an invocation of a RelOptRule
with a
set of relational expression
s as arguments.
Field Summary | |
---|---|
private Map<RelNode,List<RelNode>> |
nodeChildren
|
private RelOptRuleOperand |
operand0
|
private List<RelNode> |
parents
|
private RelOptPlanner |
planner
|
RelNode[] |
rels
|
private RelOptRule |
rule
|
protected static Logger |
tracer
|
Constructor Summary | |
---|---|
protected |
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeChildren)
|
protected |
RelOptRuleCall(RelOptPlanner planner,
RelOptRuleOperand operand,
RelNode[] rels,
Map<RelNode,List<RelNode>> nodeChildren,
List<RelNode> parents)
Creates a RelOptRuleCall. |
Method Summary | |
---|---|
List<RelNode> |
getChildRels(RelNode rel)
Returns the children of a given relational expression node matched in a rule. |
RelOptRuleOperand |
getOperand0()
Returns the root operand matched by this rule. |
List<RelNode> |
getParents()
|
RelOptPlanner |
getPlanner()
Returns the planner. |
RelNode[] |
getRels()
Returns a list of matched relational expressions. |
RelOptRule |
getRule()
Returns the invoked planner rule. |
abstract void |
transformTo(RelNode rel)
Called by the rule whenever it finds a match. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger tracer
private final RelOptRuleOperand operand0
private final Map<RelNode,List<RelNode>> nodeChildren
private final RelOptRule rule
public final RelNode[] rels
private final RelOptPlanner planner
private final List<RelNode> parents
Constructor Detail |
---|
protected RelOptRuleCall(RelOptPlanner planner, RelOptRuleOperand operand, RelNode[] rels, Map<RelNode,List<RelNode>> nodeChildren, List<RelNode> parents)
planner
- Planneroperand
- Root operandrels
- Array of relational expressions which matched each operandnodeChildren
- For each node which matched with
matchAnyChildren
=true, a list of the node's childrenparents
- list of parent RelNodes corresponding to the first
relational expression in the array argument, if known; otherwise, nullprotected RelOptRuleCall(RelOptPlanner planner, RelOptRuleOperand operand, RelNode[] rels, Map<RelNode,List<RelNode>> nodeChildren)
Method Detail |
---|
public RelOptRuleOperand getOperand0()
public RelOptRule getRule()
public RelNode[] getRels()
public List<RelNode> getChildRels(RelNode rel)
If the operand which caused the match has RelOptRuleOperand.matchAnyChildren
=false, the children will have their
own operands and therefore be easily available in the array returned by
the getRels()
method, so this method returns null.
This method is for RelOptRuleOperand.matchAnyChildren
=true,
which is generally used when a node can have a variable number of
children, and hence where the matched children are not retrievable by any
other means.
rel
- Relational expression
public RelOptPlanner getPlanner()
public List<RelNode> getParents()
public abstract void transformTo(RelNode rel)
this.rels[0]
) has its traits propagated to the new
relational expression (rel
) and its unregistered children.
Any trait not specifically set in the RelTraitSet returned by
rel.getTraits()
will be copied from
this.rels[0].getTraitSet()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |