Class RexRangeRef
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.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<R,
P> R accept
(RexBiVisitor<R, P> visitor, P arg) Accepts a visitor with a payload, dispatching to the right overloadedRexBiVisitor.visitInputRef(RexInputRef, Object)
visitXxx} method.<R> R
accept
(RexVisitor<R> visitor) Accepts a visitor, dispatching to the right overloadedvisitXxx
method.boolean
int
getType()
int
hashCode()
toString()
Methods inherited from class org.apache.calcite.rex.RexNode
getKind, isA, isA, isAlwaysFalse, isAlwaysTrue, nodeCount
-
Method Details
-
getType
-
getOffset
public int getOffset() -
accept
Description copied from class:RexNode
Accepts a visitor, dispatching to the right overloadedvisitXxx
method.Also see
RexUtil.apply(RexVisitor, java.util.List, RexNode)
, which applies a visitor to several expressions simultaneously. -
accept
Description copied from class:RexNode
Accepts a visitor with a payload, dispatching to the right overloadedRexBiVisitor.visitInputRef(RexInputRef, Object)
visitXxx} method. -
equals
Description copied from class:RexNode
Every node must implement
RexNode.equals(java.lang.Object)
based on its content -
hashCode
public int hashCode()Description copied from class:RexNode
Every node must implement
RexNode.hashCode()
consistent withRexNode.equals(java.lang.Object)
-
toString
-