Package org.apache.calcite.rel.logical
Class LogicalCorrelate
java.lang.Object
org.apache.calcite.rel.AbstractRelNode
org.apache.calcite.rel.BiRel
org.apache.calcite.rel.core.Correlate
org.apache.calcite.rel.logical.LogicalCorrelate
- All Implemented Interfaces:
Cloneable,RelOptNode,Hintable,RelNode
A relational operator that performs nested-loop joins.
It behaves like a kind of Join,
but works by setting variables in its environment and restarting its
right-hand input.
A LogicalCorrelate is used to represent a correlated query. One implementation strategy is to de-correlate the expression.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context -
Field Summary
Fields inherited from class org.apache.calcite.rel.core.Correlate
correlationId, hints, joinType, requiredColumnsFields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet -
Constructor Summary
ConstructorsConstructorDescriptionLogicalCorrelate(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) Creates a LogicalCorrelate.LogicalCorrelate(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) Deprecated.LogicalCorrelate(RelInput input) Creates a LogicalCorrelate by parsing serialized output. -
Method Summary
Modifier and TypeMethodDescriptionaccept(RelShuttle shuttle) Accepts a visit from a shuttle.copy(RelTraitSet traitSet, RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) static LogicalCorrelatecreate(RelNode left, RelNode right, List<RelHint> hints, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) Creates a LogicalCorrelate.static LogicalCorrelatecreate(RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) Deprecated.Returns a new relational expression with the specified hintshintList.Methods inherited from class org.apache.calcite.rel.core.Correlate
computeSelfCost, copy, deriveRowType, estimateRowCount, explainTerms, getCorrelationId, getCorrelVariable, getHints, getJoinType, getRequiredColumns, getVariablesSet, isValidMethods inherited from class org.apache.calcite.rel.BiRel
childrenAccept, getInputs, getLeft, getRight, replaceInputMethods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, collectVariablesSet, collectVariablesUsed, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, hashCode, isEnforcer, metadata, onRegister, recomputeDigest, register, sole, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.hint.Hintable
attachHintsMethods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable, stripped
-
Constructor Details
-
LogicalCorrelate
public LogicalCorrelate(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) Creates a LogicalCorrelate.- Parameters:
cluster- cluster this relational expression belongs toleft- left input relational expressionright- right input relational expressioncorrelationId- variable name for the row of left inputrequiredColumns- Required columnsjoinType- join type
-
LogicalCorrelate
@Deprecated public LogicalCorrelate(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) Deprecated. -
LogicalCorrelate
Creates a LogicalCorrelate by parsing serialized output.
-
-
Method Details
-
create
public static LogicalCorrelate create(RelNode left, RelNode right, List<RelHint> hints, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) Creates a LogicalCorrelate. -
create
@Deprecated public static LogicalCorrelate create(RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) Deprecated. -
copy
public LogicalCorrelate copy(RelTraitSet traitSet, RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) -
accept
Description copied from interface:RelNodeAccepts a visit from a shuttle.- Specified by:
acceptin interfaceRelNode- Overrides:
acceptin classAbstractRelNode- Parameters:
shuttle- Shuttle- Returns:
- A copy of this node incorporating changes made by the shuttle to this node's children
-
withHints
Description copied from interface:HintableReturns a new relational expression with the specified hintshintList.This method should be overridden by every logical node that supports hint. It is only for internal use during decorrelation.
Sub-class should return a new copy of the relational expression.
The default implementation returns the relational expression directly only because not every kind of relational expression supports hints.
- Returns:
- Relational expression with set up hints
-