org.eigenbase.rel
Class CorrelatorRel
java.lang.Object
org.eigenbase.rel.AbstractRelNode
org.eigenbase.rel.JoinRelBase
org.eigenbase.rel.CorrelatorRel
- All Implemented Interfaces:
- Cloneable, RelNode
public final class CorrelatorRel
- extends JoinRelBase
A CorrelatorRel
behaves like a kind of JoinRel
, but
works by setting variables in its environment and restarting its right-hand
input.
A CorrelatorRel is used to represent a correlated query. One
implementation strategy is to de-correlate the expression.
- Since:
- 23 September, 2001
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/rel/CorrelatorRel.java#19 $
- Author:
- jhyde
Nested Class Summary |
static class |
CorrelatorRel.Correlation
Describes the neccessary parameters for an implementation in order to
identify and set dynamic variables |
Methods inherited from class org.eigenbase.rel.JoinRelBase |
_isValid, childrenAccept, computeSelfCost, createJoinType, deriveJoinRowType, estimateJoinedRows, getChildExps, getCondition, getInputs, getJoinType, getLeft, getRight, getRows, getSystemFieldList, 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 |
correlations
protected final List<CorrelatorRel.Correlation> correlations
CorrelatorRel
public CorrelatorRel(RelOptCluster cluster,
RelNode left,
RelNode right,
RexNode joinCond,
List<CorrelatorRel.Correlation> correlations,
JoinRelType joinType)
- Creates a CorrelatorRel.
- Parameters:
cluster
- cluster this relational expression belongs toleft
- left input relational expressionright
- right input relational expressionjoinCond
- join conditioncorrelations
- set of expressions to set as variables each time a
row arrives from the left inputjoinType
- join type
CorrelatorRel
public CorrelatorRel(RelOptCluster cluster,
RelNode left,
RelNode right,
List<CorrelatorRel.Correlation> correlations,
JoinRelType joinType)
- Creates a CorrelatorRel with no join condition.
- Parameters:
cluster
- cluster this relational expression belongs toleft
- left input relational expressionright
- right input relational expressioncorrelations
- set of expressions to set as variables each time a
row arrives from the left inputjoinType
- join type
clone
public CorrelatorRel 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
deriveRowType
protected RelDataType deriveRowType()
- Overrides:
deriveRowType
in class JoinRelBase
explain
public void explain(RelOptPlanWriter pw)
- Specified by:
explain
in interface RelNode
- Overrides:
explain
in class JoinRelBase
getCorrelations
public List<CorrelatorRel.Correlation> getCorrelations()
- Returns the correlating expressions.
- Returns:
- correlating expressions