public final class LogicalJoin extends Join
Join
not targeted at any particular engine or calling convention.
Some rules:
JoinExtractFilterRule converts an
inner join to a filter on top of a
cartesian inner join.
net.sf.farrago.fennel.rel.FennelCartesianJoinRule
implements a LogicalJoin as a cartesian product.
RelNode.Contextcondition, hints, joinInfo, joinType, variablesSetdigest, id, rowType, traitSet| Constructor and Description |
|---|
LogicalJoin(RelInput input)
Creates a LogicalJoin by parsing serialized output.
|
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(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,
JoinRelType joinType,
Set<String> variablesStopped,
boolean semiJoinDone,
com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList)
Deprecated.
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
accept(RelShuttle shuttle)
Accepts a visit from a shuttle.
|
LogicalJoin |
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 LogicalJoin |
create(RelNode left,
RelNode right,
List<RelHint> hints,
RexNode condition,
Set<CorrelationId> variablesSet,
JoinRelType joinType)
Creates a LogicalJoin.
|
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.
|
boolean |
deepEquals(@Nullable Object obj)
Equality check for RelNode digest.
|
int |
deepHashCode()
Compute hash code for RelNode digest.
|
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
List<RelDataTypeField> |
getSystemFieldList()
Returns a list of system fields that will be prefixed to
output row type.
|
boolean |
isSemiJoinDone()
Returns whether this LogicalJoin has already spawned a
SemiJoin via
JoinAddRedundantSemiJoinRule. |
RelNode |
withHints(List<RelHint> hintList)
Returns a new relational expression with the specified hints
hintList. |
accept, analyzeCondition, computeSelfCost, copy, createJoinType, deepEquals0, deepHashCode0, deriveJoinRowType, deriveRowType, estimateJoinedRows, estimateRowCount, getCondition, getHints, getJoinType, getVariablesSet, isSemiJoin, isValidchildrenAccept, getInputs, getLeft, getRight, replaceInputcollectVariablesSet, collectVariablesUsed, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, hashCode, isEnforcer, metadata, onRegister, recomputeDigest, register, sole, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitattachHintsexplain, fieldIsNullablepublic 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)
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.
cluster - ClustertraitSet - Trait sethints - Hintsleft - Left inputright - Right inputcondition - Join conditionjoinType - Join typevariablesSet - 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 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
nullisSemiJoinDone()@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 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 public LogicalJoin(RelOptCluster cluster, RelNode left, RelNode right, RexNode condition, JoinRelType joinType, Set<String> variablesStopped)
@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)
public LogicalJoin(RelInput input)
public static LogicalJoin create(RelNode left, RelNode right, List<RelHint> hints, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType)
public 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)
public LogicalJoin copy(RelTraitSet traitSet, RexNode conditionExpr, RelNode left, RelNode right, JoinRelType joinType, boolean semiJoinDone)
JoinGeneral contract as RelNode.copy(org.apache.calcite.plan.RelTraitSet, java.util.List<org.apache.calcite.rel.RelNode>).
public RelNode accept(RelShuttle shuttle)
RelNodeaccept in interface RelNodeaccept in class AbstractRelNodeshuttle - Shuttlepublic RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriter.input(String, RelNode)
and
RelWriter.item(String, Object)
methods for each input and attribute.explainTerms in class Joinpw - Plan writerpublic boolean deepEquals(@Nullable Object obj)
AbstractRelNodeBy 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 and
AbstractRelNode.deepHashCode(). See LogicalJoin as an example.
deepEquals in interface RelNodedeepEquals in class AbstractRelNodeAbstractRelNode.deepHashCode()public int deepHashCode()
AbstractRelNodedeepHashCode in interface RelNodedeepHashCode in class AbstractRelNodeRelNode.deepEquals(Object)public boolean isSemiJoinDone()
JoinSemiJoin via
JoinAddRedundantSemiJoinRule.
The base implementation returns false.
isSemiJoinDone in class Joinpublic List<RelDataTypeField> getSystemFieldList()
JoingetSystemFieldList in class Joinpublic RelNode withHints(List<RelHint> hintList)
HintablehintList.
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.
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.