net.sf.saffron.rex
Class RexInputRef
java.lang.Object
|
+--net.sf.saffron.rex.RexNode
|
+--net.sf.saffron.rex.RexVariable
|
+--net.sf.saffron.rex.RexInputRef
- public class RexInputRef
- extends RexVariable
Variable which references a field of an input relational expression.
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
- Input #0: EMP(EMPNO, ENAME, DEPTNO) and
- Input #1: DEPT(DEPTNO AS DEPTNO2, DNAME)
then the fields are:
- Field #0: EMPNO
- Field #1: ENAME
- Field #2: DEPTNO (from EMP)
- Field #3: DEPTNO2 (from DEPT)
- Field #4: DNAME
So RexInputRef(3,Integer)
is the correct reference
for the field DEPTNO2.
- Since:
- Nov 24, 2003
- Version:
- $Id: $
- Author:
- jhyde
index
public final int index
RexInputRef
public RexInputRef(int index,
SaffronType type)
- Creates an input variable.
- Parameters:
index
- Index of the field in the underlying rowtypetype
- Type of the column
clone
public Object clone()
- Specified by:
clone
in class RexNode