public class RexInputRef extends RexSlot
Fields of the input are 0-based. If there is more than one input, they are numbered consecutively. For example, if the inputs to a join are
then the fields are:
So RexInputRef(3, Integer)
is the correct reference for the
field DEPTNO2.
RexSlot.SelfPopulatingList
Modifier and Type | Field and Description |
---|---|
private static java.util.List<java.lang.String> |
NAMES |
name, type
Constructor and Description |
---|
RexInputRef(int index,
RelDataType type)
Creates an input 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. |
static java.lang.String |
createName(int index)
Creates a name for an input reference, of the form "$index".
|
boolean |
equals(java.lang.Object obj) |
SqlKind |
getKind()
Returns the kind of node this is.
|
int |
hashCode() |
static RexInputRef |
of(int index,
java.util.List<RelDataTypeField> fields)
Creates a reference to a given field in a list of fields.
|
static RexInputRef |
of(int index,
RelDataType rowType)
Creates a reference to a given field in a row type.
|
static Pair<RexNode,java.lang.String> |
of2(int index,
java.util.List<RelDataTypeField> fields)
Creates a reference to a given field in a list of fields.
|
getName, getType
isA, isA, isAlwaysFalse, isAlwaysTrue, toString
public RexInputRef(int index, RelDataType type)
index
- Index of the field in the underlying row-typetype
- Type of the columnpublic 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 static RexInputRef of(int index, RelDataType rowType)
public static RexInputRef of(int index, java.util.List<RelDataTypeField> fields)
public static Pair<RexNode,java.lang.String> of2(int index, java.util.List<RelDataTypeField> fields)
public SqlKind getKind()
RexNode
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.public static java.lang.String createName(int index)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.