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,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 String |
createName(int index)
Creates a name for an input reference, of the form "$index".
|
boolean |
equals(Object obj)
Every node must implement
RexNode.equals(java.lang.Object) based on its content |
SqlKind |
getKind()
Returns the kind of node this is.
|
int |
hashCode()
Every node must implement
RexNode.hashCode() consistent with
RexNode.equals(java.lang.Object) |
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, nodeCount, toStringpublic RexInputRef(int index,
RelDataType type)
index - Index of the field in the underlying row-typetype - Type of the columnpublic boolean equals(Object obj)
RexNodeEvery node must implement RexNode.equals(java.lang.Object) based on its content
public int hashCode()
RexNodeEvery 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, 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 <R,P> R accept(RexBiVisitor<R,P> visitor, P arg)
RexNodeRexBiVisitor.visitInputRef(RexInputRef, Object) visitXxx} method.public static String createName(int index)
Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.