net.sf.saffron.rex
Class RexRangeRef
java.lang.Object
|
+--net.sf.saffron.rex.RexNode
|
+--net.sf.saffron.rex.RexRangeRef
- public class RexRangeRef
- extends RexNode
Reference to a range of columns.
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 RexInputRef
(5,Integer)
, and the
RexRangeRef
will disappear.
- Since:
- Nov 23, 2003
- Version:
- $Id: $
- Author:
- jhyde
Constructor Summary |
(package private) |
RexRangeRef(SaffronType rangeType,
int offset)
Creates a range reference. |
type
private final SaffronType type
offset
public final int offset
RexRangeRef
RexRangeRef(SaffronType rangeType,
int offset)
- Creates a range reference.
- Parameters:
rangeType
- Type of the record returnedoffset
- Offset of the first column within the input record
getType
public SaffronType getType()
- Specified by:
getType
in class RexNode
clone
public Object clone()
- Specified by:
clone
in class RexNode