public class RexFieldAccess extends RexNode
You might expect to use a RexFieldAccess to access columns of
relational tables, for example, the expression emp.empno in the
query
but there is a specialized expressionSELECT emp.empno FROM emp
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')
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloaded
visitXxx method. |
RelDataTypeField |
getField() |
SqlKind |
getKind()
Returns the kind of node this is.
|
RexNode |
getReferenceExpr()
Returns the expression whose field is being accessed.
|
RelDataType |
getType() |
isA, isA, isAlwaysFalse, isAlwaysTrue, toStringpublic RelDataTypeField getField()
public RelDataType getType()
public SqlKind getKind()
RexNodepublic <R> R accept(RexVisitor<R> visitor)
RexNodevisitXxx method.
Also see RexUtil.apply(RexVisitor, java.util.List, RexNode),
which applies a visitor to several expressions simultaneously.
public RexNode getReferenceExpr()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.