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.SelfPopulatingListname, type| Constructor and Description |
|---|
RexInputRef(int index,
RelDataType type)
Creates an input variable.
|
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloaded
visitXxx method. |
static String |
createName(int index)
Creates a name for an input reference, of the form "$index".
|
boolean |
equals(Object obj) |
SqlKind |
getKind()
Returns the kind of node this is.
|
int |
hashCode() |
static RexInputRef |
of(int index,
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,String> |
of2(int index,
List<RelDataTypeField> fields)
Creates a reference to a given field in a list of fields.
|
getName, getTypeisA, isA, isAlwaysFalse, isAlwaysTrue, toStringpublic RexInputRef(int index,
RelDataType type)
index - Index of the field in the underlying row-typetype - Type of the columnpublic static RexInputRef of(int index, RelDataType rowType)
public static RexInputRef of(int index, List<RelDataTypeField> fields)
public static Pair<RexNode,String> of2(int index, List<RelDataTypeField> fields)
public SqlKind getKind()
RexNodepublic <R> R accept(RexVisitor<R> visitor)
RexNodevisitXxx method.
Also see RexUtil.apply(RexVisitor, java.util.List, RexNode),
which applies a visitor to several expressions simultaneously.
public static String createName(int index)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.