|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.rex.RexNode org.eigenbase.rex.RexFieldAccess
public class 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
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 variabless, 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 | |
---|---|
private RexNode |
expr
|
private RelDataTypeField |
field
|
Fields inherited from class org.eigenbase.rex.RexNode |
---|
digest, EMPTY_ARRAY |
Constructor Summary | |
---|---|
RexFieldAccess(RexNode expr,
RelDataTypeField field)
|
Method Summary | ||
---|---|---|
|
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloaded visitXxx method. |
|
RexFieldAccess |
clone()
|
|
private String |
computeDigest()
|
|
RelDataTypeField |
getField()
|
|
RexKind |
getKind()
Returns the kind of node this is. |
|
String |
getName()
Returns the name of the field. |
|
RexNode |
getReferenceExpr()
Returns the expression whose field is being accessed. |
|
RelDataType |
getType()
|
|
void |
setReferenceExpr(RexNode expr)
|
|
String |
toString()
|
Methods inherited from class org.eigenbase.rex.RexNode |
---|
isA, isAlwaysTrue |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private RexNode expr
private final RelDataTypeField field
Constructor Detail |
---|
RexFieldAccess(RexNode expr, RelDataTypeField field)
Method Detail |
---|
public RelDataTypeField getField()
public RelDataType getType()
getType
in class RexNode
public RexFieldAccess clone()
clone
in class RexNode
public RexKind getKind()
RexNode
getKind
in class RexNode
RexKind
value, never nullpublic <R> R accept(RexVisitor<R> visitor)
RexNode
visitXxx
method.
Also see RexProgram.apply(RexVisitor, RexNode[], RexNode)
,
which applies a visitor to several expressions simultaneously.
accept
in class RexNode
public RexNode getReferenceExpr()
public void setReferenceExpr(RexNode expr)
public String getName()
public String toString()
toString
in class RexNode
private String computeDigest()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |