public class RexCall extends RexNode
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.)
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.ImmutableList<RexNode> |
operands |
| Modifier | Constructor and Description |
|---|---|
protected |
RexCall(RelDataType type,
SqlOperator op,
List<? extends RexNode> operands) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloaded
visitXxx method. |
RexCall |
clone(RelDataType type,
List<RexNode> operands)
Creates a new call to the same operator with different operands.
|
protected String |
computeDigest(boolean withType) |
SqlKind |
getKind()
Returns the kind of node this is.
|
List<RexNode> |
getOperands() |
SqlOperator |
getOperator() |
RelDataType |
getType() |
boolean |
isAlwaysFalse()
Returns whether this expression always returns false.
|
boolean |
isAlwaysTrue()
Returns whether this expression always returns true.
|
String |
toString() |
public final com.google.common.collect.ImmutableList<RexNode> operands
protected RexCall(RelDataType type, SqlOperator op, List<? extends RexNode> operands)
protected String computeDigest(boolean withType)
public <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 RelDataType getType()
public boolean isAlwaysTrue()
RexNodeTRUE.)isAlwaysTrue in class RexNodepublic boolean isAlwaysFalse()
RexNodeFALSE.)isAlwaysFalse in class RexNodepublic SqlKind getKind()
RexNodepublic SqlOperator getOperator()
public RexCall clone(RelDataType type, List<RexNode> operands)
type - Return typeoperands - Operands to callCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.