|
|||||||||
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.RexCall
public class RexCall
An expression formed by a call to an operator with zero or more expressions as operands.
Operators may be binary, unary, functions, special syntactic constructs
like CASE ... WHEN ... END
, or even internally generated
constructs like implicit type conversions. The syntax of the operator is
really irrelevant, because row-expressions (unlike SQL expressions
) do not directly represent a piece
of source code.
It's not often necessary to sub-class this class. The smarts should be in the operator, rather than the call. Any extra information about the call can often be encoded as extra arguments. (These don't need to be hidden, because no one is going to be generating source code from this tree.)
Field Summary | |
---|---|
private RexKind |
kind
|
private SqlOperator |
op
|
RexNode[] |
operands
|
private RelDataType |
type
|
Fields inherited from class org.eigenbase.rex.RexNode |
---|
digest, EMPTY_ARRAY |
Constructor Summary | |
---|---|
protected |
RexCall(RelDataType type,
SqlOperator op,
RexNode[] operands)
|
Method Summary | ||
---|---|---|
|
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloaded visitXxx method. |
|
RexCall |
clone()
|
|
RexCall |
clone(RelDataType type,
RexNode[] operands)
Creates a new call to the same operator with different operands. |
|
protected String |
computeDigest(boolean withType)
|
|
RexKind |
getKind()
Returns the kind of node this is. |
|
RexNode[] |
getOperands()
|
|
SqlOperator |
getOperator()
|
|
RelDataType |
getType()
|
|
(package private) static RexKind |
sqlKindToRexKind(SqlKind kind)
Returns the RexKind corresponding to a SqlKind . |
|
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 final SqlOperator op
public final RexNode[] operands
private final RelDataType type
private final RexKind kind
Constructor Detail |
---|
protected RexCall(RelDataType type, SqlOperator op, RexNode[] operands)
Method Detail |
---|
static RexKind sqlKindToRexKind(SqlKind kind)
RexKind
corresponding to a SqlKind
. Fails if
there is none.
protected String computeDigest(boolean withType)
public String toString()
toString
in class RexNode
public <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 RelDataType getType()
getType
in class RexNode
public RexCall clone()
clone
in class RexNode
public RexKind getKind()
RexNode
getKind
in class RexNode
RexKind
value, never nullpublic RexNode[] getOperands()
public SqlOperator getOperator()
public RexCall clone(RelDataType type, RexNode[] operands)
type
- Return typeoperands
- Operands to call
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |