Package org.apache.calcite.rex
Class RexFieldAccess
java.lang.Object
org.apache.calcite.rex.RexNode
org.apache.calcite.rex.RexFieldAccess
public class RexFieldAccess
extends org.apache.calcite.rex.RexNode
Access to a field of a row-expression.
You might expect to use a RexFieldAccess to access columns of relational tables,
for example, the expression emp.empno in the query
SELECT emp.empno FROM emp
but there is a specialized expression RexInputRef for this purpose. So in practice,
RexFieldAccess is usually used to access fields of correlating variables, for
example the expression emp.deptno in
SELECT ename
FROM dept
WHERE EXISTS (
SELECT NULL
FROM emp
WHERE emp.deptno = dept.deptno
AND gender = 'F')
FLINK modifications are at lines
- Should be removed after fixing CALCITE-6342 (Calcite 1.36.0): Lines 83-87
-
Field Summary
Fields inherited from class org.apache.calcite.rex.RexNode
digest -
Method Summary
Modifier and TypeMethodDescription<R,P> R accept(org.apache.calcite.rex.RexBiVisitor<R, P> visitor, P arg) <R> Raccept(org.apache.calcite.rex.RexVisitor<R> visitor) booleanorg.apache.calcite.rel.type.RelDataTypeFieldgetField()org.apache.calcite.sql.SqlKindgetKind()org.apache.calcite.rex.RexNodeReturns the expression whose field is being accessed.org.apache.calcite.rel.type.RelDataTypegetType()inthashCode()Methods inherited from class org.apache.calcite.rex.RexNode
isA, isA, isAlwaysFalse, isAlwaysTrue, nodeCount, toString
-
Method Details
-
getField
public org.apache.calcite.rel.type.RelDataTypeField getField() -
getType
public org.apache.calcite.rel.type.RelDataType getType()- Specified by:
getTypein classorg.apache.calcite.rex.RexNode
-
getKind
public org.apache.calcite.sql.SqlKind getKind()- Overrides:
getKindin classorg.apache.calcite.rex.RexNode
-
accept
public <R> R accept(org.apache.calcite.rex.RexVisitor<R> visitor) - Specified by:
acceptin classorg.apache.calcite.rex.RexNode
-
accept
public <R,P> R accept(org.apache.calcite.rex.RexBiVisitor<R, P> visitor, P arg) - Specified by:
acceptin classorg.apache.calcite.rex.RexNode
-
getReferenceExpr
public org.apache.calcite.rex.RexNode getReferenceExpr()Returns the expression whose field is being accessed. -
equals
- Specified by:
equalsin classorg.apache.calcite.rex.RexNode
-
hashCode
public int hashCode()- Specified by:
hashCodein classorg.apache.calcite.rex.RexNode
-