Package org.apache.calcite.rex
Class RexFieldAccess
java.lang.Object
org.apache.calcite.rex.RexNode
org.apache.calcite.rex.RexFieldAccess
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')
-
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
getField()
getKind()
Returns the kind of node this is.Returns the expression whose field is being accessed.getType()
int
hashCode()
Methods inherited from class org.apache.calcite.rex.RexNode
isA, isA, isAlwaysFalse, isAlwaysTrue, nodeCount, toString
-
Method Details
-
getField
-
getType
-
getKind
Description copied from class:RexNode
Returns the kind of node this is. -
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. -
getReferenceExpr
Returns the expression whose field is being accessed. -
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)
-