Class RexTableInputRef
This object is used by
BuiltInMetadata.ExpressionLineage
and BuiltInMetadata.AllPredicates.
Given a relational expression, its purpose is to be able to reference uniquely
the provenance of a given expression. For that, it uses a unique table reference
(contained in a RexTableInputRef.RelTableRef) and an column index within the table.
For example, A.#0.$3 + 2 column $3 in the 0
occurrence of table A in the plan.
Note that this kind of RexNode is an auxiliary data structure with
a very specific purpose and should not be used in relational expressions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classIdentifies uniquely a table by its qualified name and its entity number (occurrence).Nested classes/interfaces inherited from class org.apache.calcite.rex.RexSlot
RexSlot.SelfPopulatingList -
Field Summary
Fields inherited from class org.apache.calcite.rex.RexVariable
name, type -
Method Summary
Modifier and TypeMethodDescription<R,P> R accept(RexBiVisitor<R, P> visitor, P arg) Accepts a visitor with a payload, dispatching to the right overloadedRexBiVisitor.visitInputRef(RexInputRef, Object)visitXxx} method.<R> Raccept(RexVisitor<R> visitor) Accepts a visitor, dispatching to the right overloadedvisitXxxmethod.booleanintgetKind()Returns the kind of node this is.inthashCode()static RexTableInputRefof(RexTableInputRef.RelTableRef tableRef, int index, RelDataType type) static RexTableInputRefof(RexTableInputRef.RelTableRef tableRef, RexInputRef ref) Methods inherited from class org.apache.calcite.rex.RexInputRef
add2, createName, of, of, of2Methods inherited from class org.apache.calcite.rex.RexVariable
getName, getTypeMethods inherited from class org.apache.calcite.rex.RexNode
isA, isA, isAlwaysFalse, isAlwaysTrue, nodeCount, toString
-
Method Details
-
equals
Description copied from class:RexNodeEvery node must implement
RexNode.equals(java.lang.Object)based on its content- Overrides:
equalsin classRexInputRef
-
hashCode
public int hashCode()Description copied from class:RexNodeEvery node must implement
RexNode.hashCode()consistent withRexNode.equals(java.lang.Object)- Overrides:
hashCodein classRexInputRef
-
getTableRef
-
getQualifiedName
-
getIdentifier
public int getIdentifier() -
of
public static RexTableInputRef of(RexTableInputRef.RelTableRef tableRef, int index, RelDataType type) -
of
-
accept
Description copied from class:RexNodeAccepts a visitor, dispatching to the right overloadedvisitXxxmethod.Also see
RexUtil.apply(RexVisitor, java.util.List, RexNode), which applies a visitor to several expressions simultaneously.- Overrides:
acceptin classRexInputRef
-
accept
Description copied from class:RexNodeAccepts a visitor with a payload, dispatching to the right overloadedRexBiVisitor.visitInputRef(RexInputRef, Object)visitXxx} method.- Overrides:
acceptin classRexInputRef
-
getKind
Description copied from class:RexNodeReturns the kind of node this is.- Overrides:
getKindin classRexInputRef- Returns:
- Node kind, never null
-