org.eigenbase.rex
Class RexLocalRef
java.lang.Object
org.eigenbase.rex.RexNode
org.eigenbase.rex.RexVariable
org.eigenbase.rex.RexSlot
org.eigenbase.rex.RexLocalRef
public class RexLocalRef
- extends RexSlot
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.
- Since:
- Oct 25, 2005
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/rex/RexLocalRef.java#10 $
- Author:
- jhyde
names
private static final String[] names
RexLocalRef
public RexLocalRef(int index,
RelDataType type)
- Creates a local variable.
- Parameters:
index
- Index of the field in the underlying rowtypetype
- Type of the column- "Precondition:"
- type != null, index >= 0
clone
public RexLocalRef clone()
- Specified by:
clone
in class RexNode
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
accept
public <R> R accept(RexVisitor<R> visitor)
- Description copied from class:
RexNode
- Accepts a visitor, dispatching to the right overloaded
visitXxx
method.
Also see RexProgram.apply(RexVisitor, RexNode[], RexNode)
,
which applies a visitor to several expressions simultaneously.
- Specified by:
accept
in class RexNode
createName
private static String createName(int index)