Class RexInputRef

  • Direct Known Subclasses:
    RexPatternFieldRef, RexTableInputRef

    public class RexInputRef
    extends RexSlot
    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.

    • Field Detail

      • NAMES

        private static final java.util.List<java.lang.String> NAMES
    • Constructor Detail

      • RexInputRef

        public RexInputRef​(int index,
                           RelDataType type)
        Creates an input variable.
        Parameters:
        index - Index of the field in the underlying row-type
        type - Type of the column