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
Modifier and TypeClassDescriptionstatic class
Identifies 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> R
accept
(RexVisitor<R> visitor) Accepts a visitor, dispatching to the right overloadedvisitXxx
method.boolean
int
getKind()
Returns the kind of node this is.int
hashCode()
static RexTableInputRef
of
(RexTableInputRef.RelTableRef tableRef, int index, RelDataType type) static RexTableInputRef
of
(RexTableInputRef.RelTableRef tableRef, RexInputRef ref) Methods inherited from class org.apache.calcite.rex.RexInputRef
add2, createName, of, of, of2
Methods inherited from class org.apache.calcite.rex.RexVariable
getName, getType
Methods inherited from class org.apache.calcite.rex.RexNode
isA, isA, isAlwaysFalse, isAlwaysTrue, nodeCount, toString
-
Method Details
-
equals
Description copied from class:RexNode
Every node must implement
RexNode.equals(java.lang.Object)
based on its content- Overrides:
equals
in classRexInputRef
-
hashCode
public int hashCode()Description copied from class:RexNode
Every node must implement
RexNode.hashCode()
consistent withRexNode.equals(java.lang.Object)
- Overrides:
hashCode
in 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:RexNode
Accepts a visitor, dispatching to the right overloadedvisitXxx
method.Also see
RexUtil.apply(RexVisitor, java.util.List, RexNode)
, which applies a visitor to several expressions simultaneously.- Overrides:
accept
in classRexInputRef
-
accept
Description copied from class:RexNode
Accepts a visitor with a payload, dispatching to the right overloadedRexBiVisitor.visitInputRef(RexInputRef, Object)
visitXxx} method.- Overrides:
accept
in classRexInputRef
-
getKind
Description copied from class:RexNode
Returns the kind of node this is.- Overrides:
getKind
in classRexInputRef
- Returns:
- Node kind, never null
-