|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<RexKind> org.eigenbase.rex.RexKind
public enum RexKind
Enumeration of some important types of row-expression.
The values are immutable, canonical constants, so you can use Kinds to
find particular types of expressions quickly. To identity a call to a common
operator such as '=', use RexNode.isA(org.eigenbase.rex.RexKind)
:
To identify a category of expressions, you can useexp.isA
(RexKind.Equals
)
RexNode.isA(org.eigenbase.rex.RexKind)
with
an aggregate RexKind. The following expression will return true
for calls to '=' and '>=', but false
for the constant '5', or
a call to '+':
To quickly choose between a number of options, use a switch statement:exp.isA
(RexKind.Comparison
)
switch (exp.getKind()) { caseEquals
: ...; caseNotEquals
: ...; default: throwUtil.unexpected
(exp.getKind()); }
Enum Constant Summary | |
---|---|
And
The logical "AND" operator. |
|
Arithmetic
An arithmetic operator ( Divide , Minus , MinusPrefix , Plus , Times ). |
|
Cast
|
|
Comparison
A comparison operator ( Equals , GreaterThan , etc.). |
|
Concat
The string concatenation operator, "||". |
|
Divide
The arithmetic division operator, "/". |
|
DynamicParam
A dynamic parameter. |
|
Equals
The equals operator, "=". |
|
FieldAccess
The field access operator, ".". |
|
GreaterThan
The greater-than operator, ">". |
|
GreaterThanOrEqual
The greater-than-or-equal operator, ">=". |
|
Identifier
An identifier. |
|
IsFalse
The IS FALSE operator. |
|
IsNull
The IS NULL operator. |
|
IsTrue
The IS TRUE operator. |
|
LessThan
The less-than operator, "<". |
|
LessThanOrEqual
The less-than-or-equal operator, "<=". |
|
Like
The LIKE operator. |
|
Literal
A literal. |
|
Logical
A logical operator ( And , Or , Not ). |
|
Minus
The arithmetic minus operator, "-". |
|
MinusPrefix
The unary minus operator, as in "-1". |
|
MultisetQueryConstructor
The MULTISET Query Constructor |
|
NewSpecification
NEW invocation |
|
Not
The logical "NOT" operator. |
|
NotEquals
The not-equals operator, "!=" or "<>". |
|
Or
The logical "OR" operator. |
|
Other
No operator in particular. |
|
Plus
The arithmetic plus operator, "+". |
|
Reinterpret
The internal REINTERPRET operator |
|
Row
The row constructor operator. |
|
Similar
The SIMILAR operator. |
|
Substr
The substring function. |
|
Times
The arithmetic multiplication operator, "*". |
|
Trim
|
|
Values
The VALUES operator. |
Field Summary | |
---|---|
private Set<RexKind> |
otherKinds
|
Method Summary | |
---|---|
boolean |
includes(RexKind kind)
|
static RexKind |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static RexKind[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final RexKind Other
public static final RexKind Equals
public static final RexKind NotEquals
public static final RexKind GreaterThan
public static final RexKind GreaterThanOrEqual
public static final RexKind LessThan
public static final RexKind LessThanOrEqual
public static final RexKind Comparison
Equals
, GreaterThan
, etc.).
Comparisons are always a RexCall
with 2 arguments.
public static final RexKind And
public static final RexKind Or
public static final RexKind Not
public static final RexKind Logical
And
, Or
, Not
).
public static final RexKind Divide
public static final RexKind Minus
MinusPrefix
public static final RexKind Plus
public static final RexKind MinusPrefix
Minus
public static final RexKind Times
public static final RexKind Arithmetic
Divide
, Minus
, MinusPrefix
, Plus
, Times
).
public static final RexKind FieldAccess
public static final RexKind Concat
public static final RexKind Substr
public static final RexKind Row
public static final RexKind IsNull
public static final RexKind Identifier
public static final RexKind Literal
public static final RexKind Values
public static final RexKind IsTrue
public static final RexKind IsFalse
public static final RexKind DynamicParam
public static final RexKind Cast
public static final RexKind Trim
public static final RexKind Like
public static final RexKind Similar
public static final RexKind MultisetQueryConstructor
public static final RexKind NewSpecification
public static final RexKind Reinterpret
Field Detail |
---|
private final Set<RexKind> otherKinds
Method Detail |
---|
public static final RexKind[] values()
for(RexKind c : RexKind.values()) System.out.println(c);
public static RexKind valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic boolean includes(RexKind kind)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |