Class LogicalAsofJoin
- All Implemented Interfaces:
Cloneable,RelOptNode,Hintable,RelNode
AsofJoin encoding ASOF joins.
Adapted from the LogicalJoin implementation.-
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.AsofJoin
matchConditionFields inherited from class org.apache.calcite.rel.core.Join
condition, hints, joinInfo, joinType, variablesSetFields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet -
Constructor Summary
ConstructorsConstructorDescriptionLogicalAsofJoin(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelNode left, RelNode right, RexNode condition, RexNode matchCondition, JoinRelType joinType, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Creates a LogicalAsofJoin.LogicalAsofJoin(RelInput input) Creates a LogicalAsofJoin by parsing serialized output. -
Method Summary
Modifier and TypeMethodDescriptionaccept(RelShuttle shuttle) Accepts a visit from a shuttle.copy(RelTraitSet traitSet, List<RelNode> inputs) Creates a copy of this relational expression, perhaps changing traits and inputs.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.copy(RelTraitSet traitSet, RexNode conditionExpr, RexNode matchConditionExpr, RelNode left, RelNode right) static LogicalAsofJoincreate(RelNode left, RelNode right, List<RelHint> hints, RexNode condition, RexNode matchCondition, JoinRelType joinType, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Creates a LogicalAsofJoin.booleandeepEquals(@Nullable Object obj) Equality check for RelNode digest.intCompute hash code for RelNode digest.com.google.common.collect.ImmutableList<RelDataTypeField>Returns a list of system fields that will be prefixed to output row type.Returns a new relational expression with the specified hintshintList.Methods inherited from class org.apache.calcite.rel.core.AsofJoin
explainTerms, getMatchConditionMethods inherited from class org.apache.calcite.rel.core.Join
accept, analyzeCondition, computeSelfCost, createJoinType, deepEquals0, deepHashCode0, deriveJoinRowType, deriveRowType, estimateJoinedRows, estimateRowCount, getCondition, getHints, getJoinType, getVariablesSet, isSemiJoin, isSemiJoinDone, isValidMethods inherited from class org.apache.calcite.rel.BiRel
childrenAccept, getInputs, getLeft, getRight, replaceInputMethods inherited from class org.apache.calcite.rel.AbstractRelNode
collectVariablesSet, 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.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
-
LogicalAsofJoin
public LogicalAsofJoin(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelNode left, RelNode right, RexNode condition, RexNode matchCondition, JoinRelType joinType, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Creates a LogicalAsofJoin.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, org.apache.calcite.rex.RexNode, org.apache.calcite.rel.core.JoinRelType, com.google.common.collect.ImmutableList<org.apache.calcite.rel.type.RelDataTypeField>)unless you know what you're doing.- Parameters:
cluster- ClustertraitSet- Trait sethints- Hintsleft- Left inputright- Right inputcondition- Join conditionmatchCondition- Temporal conditionsystemFieldList- List of system fields that will be prefixed to output row type; typically empty but must not be null
-
LogicalAsofJoin
Creates a LogicalAsofJoin by parsing serialized output.
-
-
Method Details
-
create
public static LogicalAsofJoin create(RelNode left, RelNode right, List<RelHint> hints, RexNode condition, RexNode matchCondition, JoinRelType joinType, com.google.common.collect.ImmutableList<RelDataTypeField> systemFieldList) Creates a LogicalAsofJoin. -
copy
public LogicalAsofJoin copy(RelTraitSet traitSet, RexNode conditionExpr, RexNode matchConditionExpr, RelNode left, RelNode right) -
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
-
deepEquals
Description 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 interfaceRelNode- Overrides:
deepEqualsin classAbstractRelNode- Returns:
- Whether the 2 RelNodes are equivalent or have the same digest.
- See Also:
-
deepHashCode
public int deepHashCode()Description copied from class:AbstractRelNodeCompute hash code for RelNode digest.- Specified by:
deepHashCodein interfaceRelNode- Overrides:
deepHashCodein classAbstractRelNode- See Also:
-
getSystemFieldList
Description copied from class:JoinReturns a list of system fields that will be prefixed to output row type.- Overrides:
getSystemFieldListin classJoin- Returns:
- list of system fields
-
copy
public Join 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>). -
copy
Description copied from interface:RelNodeCreates a copy of this relational expression, perhaps changing traits and inputs.Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
-
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
-