Class LogicalJoin
- All Implemented Interfaces:
- Cloneable,- RelOptNode,- Hintable,- RelNode
Join
 not targeted at any particular engine or calling convention.
 Some rules:
- JoinExtractFilterRuleconverts an- inner jointo a- filteron top of a- cartesian inner join.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.calcite.rel.RelNodeRelNode.Context
- 
Field SummaryFields inherited from class org.apache.calcite.rel.core.Joincondition, hints, joinInfo, joinType, variablesSetFields inherited from class org.apache.calcite.rel.AbstractRelNodedigest, id, rowType, traitSet
- 
Constructor SummaryConstructorsConstructorDescriptionLogicalJoin(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelNode left, RelNode right, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Creates a LogicalJoin.LogicalJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Deprecated.LogicalJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right, RexNode condition, JoinRelType joinType, Set<String> variablesStopped, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Deprecated.LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right, RexNode condition, JoinRelType joinType, Set<String> variablesStopped) Deprecated.LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right, RexNode condition, JoinRelType joinType, Set<String> variablesStopped, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Deprecated.LogicalJoin(RelInput input) Creates a LogicalJoin by parsing serialized output.
- 
Method SummaryModifier and TypeMethodDescriptionaccept(RelShuttle shuttle) Accepts a visit from a shuttle.copy(RelTraitSet traitSet, RexNode conditionExpr, RelNode left, RelNode right, JoinRelType joinType, boolean semiJoinDone) Creates a copy of this join, overriding condition, system fields and inputs.static LogicalJoincreate(RelNode left, RelNode right, List<RelHint> hints, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType) Creates a LogicalJoin.static LogicalJoincreate(RelNode left, RelNode right, List<RelHint> hints, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Creates a LogicalJoin, flagged with whether it has been translated to a semi-join.booleandeepEquals(@Nullable Object obj) Equality check for RelNode digest.intCompute hash code for RelNode digest.Describes the inputs and attributes of this relational expression.Returns a list of system fields that will be prefixed to output row type.booleanReturns whether this LogicalJoin has already spawned aSemiJoinviaJoinAddRedundantSemiJoinRule.Returns a new relational expression with the specified hintshintList.Methods inherited from class org.apache.calcite.rel.core.Joinaccept, analyzeCondition, computeSelfCost, copy, createJoinType, deepEquals0, deepHashCode0, deriveJoinRowType, deriveRowType, estimateJoinedRows, estimateRowCount, getCondition, getHints, getJoinType, getVariablesSet, isSemiJoin, isValidMethods inherited from class org.apache.calcite.rel.BiRelchildrenAccept, getInputs, getLeft, getRight, replaceInputMethods inherited from class org.apache.calcite.rel.AbstractRelNodecollectVariablesSet, collectVariablesUsed, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, hashCode, isEnforcer, metadata, onRegister, recomputeDigest, register, sole, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.hint.HintableattachHintsMethods inherited from interface org.apache.calcite.rel.RelNodeexplain, fieldIsNullable, stripped
- 
Constructor Details- 
LogicalJoinpublic LogicalJoin(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelNode left, RelNode right, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Creates a LogicalJoin.Use create(org.apache.calcite.rel.RelNode, org.apache.calcite.rel.RelNode, java.util.List<org.apache.calcite.rel.hint.RelHint>, org.apache.calcite.rex.RexNode, java.util.Set<org.apache.calcite.rel.core.CorrelationId>, org.apache.calcite.rel.core.JoinRelType)unless you know what you're doing.- Parameters:
- cluster- Cluster
- traitSet- Trait set
- hints- Hints
- left- Left input
- right- Right input
- condition- Join condition
- variablesSet- Set of variables that are set by the LHS and used by the RHS and are not available to nodes above this LogicalJoin in the tree
- joinType- Join type
- semiJoinDone- Whether this join has been translated to a semi-join
- systemFieldList- List of system fields that will be prefixed to output row type; typically empty but must not be null
- See Also:
 
- 
LogicalJoin@Deprecated public LogicalJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Deprecated.
- 
LogicalJoin@Deprecated public LogicalJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode left, RelNode right, RexNode condition, JoinRelType joinType, Set<String> variablesStopped, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Deprecated.
- 
LogicalJoin@Deprecated public LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right, RexNode condition, JoinRelType joinType, Set<String> variablesStopped) Deprecated.
- 
LogicalJoin@Deprecated public LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right, RexNode condition, JoinRelType joinType, Set<String> variablesStopped, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Deprecated.
- 
LogicalJoinCreates a LogicalJoin by parsing serialized output.
 
- 
- 
Method Details- 
createpublic static LogicalJoin create(RelNode left, RelNode right, List<RelHint> hints, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType) Creates a LogicalJoin.
- 
createpublic static LogicalJoin create(RelNode left, RelNode right, List<RelHint> hints, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType, boolean semiJoinDone, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Creates a LogicalJoin, flagged with whether it has been translated to a semi-join.
- 
copypublic LogicalJoin copy(RelTraitSet traitSet, RexNode conditionExpr, RelNode left, RelNode right, JoinRelType joinType, boolean semiJoinDone) Description copied from class:JoinCreates a copy of this join, overriding condition, system fields and inputs.General contract as RelNode.copy(org.apache.calcite.plan.RelTraitSet, java.util.List<org.apache.calcite.rel.RelNode>).
- 
acceptDescription copied from interface:RelNodeAccepts a visit from a shuttle.- Specified by:
- acceptin interface- RelNode
- Overrides:
- acceptin class- AbstractRelNode
- Parameters:
- shuttle- Shuttle
- Returns:
- A copy of this node incorporating changes made by the shuttle to this node's children
 
- 
explainTermsDescription copied from class:AbstractRelNodeDescribes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms, then call theRelWriter.input(String, RelNode)andRelWriter.item(String, Object)methods for each input and attribute.- Overrides:
- explainTermsin class- Join
- Parameters:
- pw- Plan writer
- Returns:
- Plan writer for fluent-explain pattern
 
- 
deepEqualsDescription copied from class:AbstractRelNodeEquality check for RelNode digest.By default this method collects digest attributes from AbstractRelNode.explainTerms(RelWriter), then compares each attribute pair. This should work well for most cases. If this method is a performance bottleneck for your project, or the default behavior can't handle your scenario properly, you can choose to override this method andAbstractRelNode.deepHashCode(). SeeLogicalJoinas an example.- Specified by:
- deepEqualsin interface- RelNode
- Overrides:
- deepEqualsin class- AbstractRelNode
- Returns:
- Whether the 2 RelNodes are equivalent or have the same digest.
- See Also:
 
- 
deepHashCodepublic int deepHashCode()Description copied from class:AbstractRelNodeCompute hash code for RelNode digest.- Specified by:
- deepHashCodein interface- RelNode
- Overrides:
- deepHashCodein class- AbstractRelNode
- See Also:
 
- 
isSemiJoinDonepublic boolean isSemiJoinDone()Description copied from class:JoinReturns whether this LogicalJoin has already spawned aSemiJoinviaJoinAddRedundantSemiJoinRule.The base implementation returns false. - Overrides:
- isSemiJoinDonein class- Join
- Returns:
- whether this join has already spawned a semi join
 
- 
getSystemFieldListDescription copied from class:JoinReturns a list of system fields that will be prefixed to output row type.- Overrides:
- getSystemFieldListin class- Join
- Returns:
- list of system fields
 
- 
withHintsDescription 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
 
 
-