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
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')
| Modifier and Type | Field and Description |
|---|---|
private RexNode |
expr |
private RelDataTypeField |
field |
| Constructor and Description |
|---|
RexFieldAccess(RexNode expr,
RelDataTypeField field) |
| Modifier and Type | Method and Description |
|---|---|
<R,P> R |
accept(RexBiVisitor<R,P> visitor,
P arg)
Accepts a visitor with a payload, dispatching to the right overloaded
RexBiVisitor.visitInputRef(RexInputRef, Object) visitXxx} method. |
<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, toStringprivate final RexNode expr
private final RelDataTypeField field
RexFieldAccess(RexNode expr, RelDataTypeField field)
public 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 <R,P> R accept(RexBiVisitor<R,P> visitor, P arg)
RexNodeRexBiVisitor.visitInputRef(RexInputRef, Object) visitXxx} method.public RexNode getReferenceExpr()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.