public class RexLocalRef extends RexSlot
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.
RexSlot.SelfPopulatingList
Modifier and Type | Field and Description |
---|---|
private static java.util.List<java.lang.String> |
NAMES |
name, type
Constructor and Description |
---|
RexLocalRef(int index,
RelDataType type)
Creates a local variable.
|
Modifier and Type | Method and Description |
---|---|
<R,P> R |
accept(RexBiVisitor<R,P> visitor,
P arg)
Accepts a visitor with a payload, dispatching to the right overloaded
RexBiVisitor.visitInputRef(RexInputRef, Object) visitXxx} method. |
<R> R |
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloaded
visitXxx method. |
private static java.lang.String |
createName(int index) |
boolean |
equals(java.lang.Object obj) |
SqlKind |
getKind()
Returns the kind of node this is.
|
int |
hashCode() |
getName, getType
isA, isA, isAlwaysFalse, isAlwaysTrue, toString
public RexLocalRef(int index, RelDataType type)
index
- Index of the field in the underlying row typetype
- Type of the columnpublic SqlKind getKind()
RexNode
public boolean equals(java.lang.Object obj)
RexNode
Every node must implement RexNode.equals(java.lang.Object)
based on its content
public int hashCode()
RexNode
Every node must implement RexNode.hashCode()
consistent with
RexNode.equals(java.lang.Object)
public <R> R accept(RexVisitor<R> visitor)
RexNode
visitXxx
method.
Also see RexUtil.apply(RexVisitor, java.util.List, RexNode)
,
which applies a visitor to several expressions simultaneously.
public <R,P> R accept(RexBiVisitor<R,P> visitor, P arg)
RexNode
RexBiVisitor.visitInputRef(RexInputRef, Object)
visitXxx} method.private static java.lang.String createName(int index)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.