Package org.apache.calcite.rex
Class RexLocalRef
java.lang.Object
org.apache.calcite.rex.RexNode
org.apache.calcite.rex.RexVariable
org.apache.calcite.rex.RexSlot
org.apache.calcite.rex.RexLocalRef
Local variable.
Identity is based upon type and index. We want multiple references to the same slot in the same context to be equal. A side effect is that references to slots in different contexts which happen to have the same index and type will be considered equal; this is not desired, but not too damaging, because of the immutability.
Variables are immutable.
-
Nested Class Summary
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 -
Constructor Summary
Constructors -
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.booleangetKind()Returns the kind of node this is.inthashCode()Methods inherited from class org.apache.calcite.rex.RexVariable
getName, getTypeMethods inherited from class org.apache.calcite.rex.RexNode
isA, isA, isAlwaysFalse, isAlwaysTrue, nodeCount, toString
-
Constructor Details
-
RexLocalRef
Creates a local variable.- Parameters:
index- Index of the field in the underlying row typetype- Type of the column
-
-
Method Details
-
getKind
Description copied from class:RexNodeReturns the kind of node this is. -
equals
Description copied from class:RexNodeEvery node must implement
RexNode.equals(java.lang.Object)based on its content -
hashCode
public int hashCode()Description copied from class:RexNodeEvery node must implement
RexNode.hashCode()consistent withRexNode.equals(java.lang.Object) -
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. -
accept
Description copied from class:RexNodeAccepts a visitor with a payload, dispatching to the right overloadedRexBiVisitor.visitInputRef(RexInputRef, Object)visitXxx} method.
-