public class RexRangeRef extends RexNode
This construct is used only during the process of translating a
SQL tree to a
rel/rex
tree. Regular rex trees do not contain this
construct.
While translating a join of EMP(EMPNO, ENAME, DEPTNO) to DEPT(DEPTNO2,
DNAME) we create RexRangeRef(DeptType,3) to represent the pair
of columns (DEPTNO2, DNAME) which came from DEPT. The type has 2 columns, and
therefore the range represents columns {3, 4} of the input.
Suppose we later create a reference to the DNAME field of this
RexRangeRef; it will return a ,
and the RexInputRef(5,Integer)RexRangeRef will disappear.
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloaded
visitXxx method. |
int |
getOffset() |
RelDataType |
getType() |
getKind, isA, isA, isAlwaysFalse, isAlwaysTrue, toStringpublic RelDataType getType()
public int getOffset()
public <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.
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.