org.eigenbase.rel
Class JoinRel
java.lang.Object
org.eigenbase.rel.AbstractRelNode
org.eigenbase.rel.JoinRelBase
org.eigenbase.rel.JoinRel
- All Implemented Interfaces:
- Cloneable, RelNode
public final class JoinRel
- extends JoinRelBase
A JoinRel represents two relational expressions joined according to some
condition.
Some rules:
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/rel/JoinRel.java#27 $
- Author:
- jhyde
Constructor Summary |
JoinRel(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
Creates a JoinRel. |
JoinRel(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
List<RelDataTypeField> systemFieldList)
Creates a JoinRel, flagged with whether it has been translated to a
semi-join. |
Methods inherited from class org.eigenbase.rel.JoinRelBase |
_isValid, childrenAccept, computeSelfCost, createJoinType, deriveJoinRowType, deriveRowType, estimateJoinedRows, getChildExps, getCondition, getInputs, getJoinType, getLeft, getRight, getRows, getVariablesStopped, registerStoppedVariable, replaceInput, setVariablesStopped |
Methods inherited from class org.eigenbase.rel.AbstractRelNode |
cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTable, getTraits, inheritTraitsFrom, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString |
semiJoinDone
private final boolean semiJoinDone
systemFieldList
private List<RelDataTypeField> systemFieldList
JoinRel
public JoinRel(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped)
- Creates a JoinRel.
- Parameters:
cluster
- Clusterleft
- Left inputright
- Right inputcondition
- Join conditionjoinType
- Join typevariablesStopped
- Set of names of variables which are set by the
LHS and used by the RHS and are not available to nodes above this JoinRel
in the tree
JoinRel
public JoinRel(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode condition,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
List<RelDataTypeField> systemFieldList)
- Creates a JoinRel, flagged with whether it has been translated to a
semi-join.
- Parameters:
cluster
- Clusterleft
- Left inputright
- Right inputcondition
- Join conditionjoinType
- Join typevariablesStopped
- Set of names of variables which are set by the
LHS and used by the RHS and are not available to nodes above this JoinRel
in the treesemiJoinDone
- Whether this join has been translated to a semi-joinsystemFieldList
- List of system fields that will be prefixed to
output row type; typically empty but must not be null- See Also:
isSemiJoinDone()
clone
public JoinRel clone()
- Description copied from interface:
RelNode
- Clones this RelNode.
Traits of the RelNode must be explicitly cloned, using AbstractRelNode.inheritTraitsFrom(AbstractRelNode)
, as the RelNode may
have traits of which it has no knowledge. Example implementation:
public MyRelNode clone()
{
MyRelNode clone = new MyRelNode(...);
clone.inheritTraitsFrom(this);
return clone;
}
N.B.: This method must be overridden whenever an existing,
concrete RelNode is extended. Otherwise, calling clone() will produce a
differently typed RelNode, resulting in invalid or incorrect query plans.
- Specified by:
clone
in interface RelNode
- Specified by:
clone
in class AbstractRelNode
- Returns:
- a clone of this RelNode
explain
public void explain(RelOptPlanWriter pw)
- Specified by:
explain
in interface RelNode
- Overrides:
explain
in class JoinRelBase
isSemiJoinDone
public boolean isSemiJoinDone()
- Returns whether this JoinRel has already spawned a
SemiJoinRel
via AddRedundantSemiJoinRule
.
- Returns:
- whether this join has already spawned a semi join
getSystemFieldList
public List<RelDataTypeField> getSystemFieldList()
- Description copied from class:
JoinRelBase
- Returns a list of system fields that will be prefixed to
output row type.
- Overrides:
getSystemFieldList
in class JoinRelBase
- Returns:
- list of system fields