net.sf.saffron.rex
Class RexCall
java.lang.Object
|
+--net.sf.saffron.rex.RexNode
|
+--net.sf.saffron.rex.RexCall
- public class RexCall
- extends RexNode
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.)
- Since:
- Nov 24, 2003
- Version:
- $Id: $
- Author:
- jhyde
op
public final SqlOperator op
operands
public final RexNode[] operands
type
private final SaffronType type
kind
private final RexKind kind
RexCall
RexCall(SaffronType type,
SqlOperator op,
RexNode[] operands)
sqlKindToRexKind
static RexKind sqlKindToRexKind(SqlKind kind)
- Returns the
RexKind
corresponding to a SqlKind
.
Fails if there is none.
- Post-condition:
- return != null
- Test-case:
RexTest.testKindMapping()
computeDigest
private String computeDigest()
getType
public SaffronType getType()
- Specified by:
getType
in class RexNode
clone
public Object clone()
- Specified by:
clone
in class RexNode
getKind
public RexKind getKind()
- Description copied from class:
RexNode
- Returns the kind of node this is.
- Overrides:
getKind
in class RexNode
- Returns:
- A
RexKind
value, never null