public enum SqlKind extends Enum<SqlKind>
SqlNode.
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 SqlNode.isA(java.util.Set<org.apache.calcite.sql.SqlKind>):
exp.isA(EQUALS)
Only commonly-used nodes have their own type; other nodes are of type
OTHER. Some of the values, such as SET_QUERY, represent
aggregates.
To quickly choose between a number of options, use a switch statement:
switch (exp.getKind()) {
case EQUALS:
...;
case NOT_EQUALS:
...;
default:
throw new AssertionError("unexpected");
}
Note that we do not even have to check that a SqlNode is a
SqlCall.
To identify a category of expressions, use SqlNode.isA with
an aggregate SqlKind. The following expression will return true
for calls to '=' and '>=', but false for the constant '5', or
a call to '+':
exp.isA(SqlKind.COMPARISON)
RexNode also has a getKind method; SqlKind values are
preserved during translation from SqlNode to RexNode, where
applicable.
There is no water-tight definition of "common", but that's OK. There will
always be operators that don't have their own kind, and for these we use the
SqlOperator. But for really the common ones, e.g. the many places
where we are looking for AND, OR and EQUALS, the enum
helps.
(If we were using Scala, SqlOperator would be a case
class, and we wouldn't need SqlKind. But we're not.)
| Enum Constant and Description |
|---|
ALL
ALL quantification operator. |
ALTER_INDEX
ALTER INDEX DDL statement. |
ALTER_MATERIALIZED_VIEW
ALTER MATERIALIZED VIEW DDL statement. |
ALTER_SEQUENCE
ALTER SEQUENCE DDL statement. |
ALTER_SESSION
ALTER SESSION DDL statement. |
ALTER_TABLE
ALTER TABLE DDL statement. |
ALTER_VIEW
ALTER VIEW DDL statement. |
AND
Logical "AND" operator.
|
ANY_VALUE
The
ANY_VALUE aggregate function. |
ARGUMENT_ASSIGNMENT
Argument assignment operator,
=>. |
ARRAY_AGG
The
ARRAY_AGG aggregate function. |
ARRAY_CONCAT
ARRAY_CONCAT function (BigQuery semantics). |
ARRAY_CONCAT_AGG
The
ARRAY_CONCAT_AGG aggregate function. |
ARRAY_QUERY_CONSTRUCTOR
Array Query Constructor, e.g.
|
ARRAY_REVERSE
ARRAY_REVERSE function (BigQuery semantics). |
ARRAY_VALUE_CONSTRUCTOR
Array Value Constructor, e.g.
|
AS
AS operator. |
ATTRIBUTE_DEF
Attribute definition.
|
AVG
The
AVG aggregate function. |
BETWEEN
BETWEEN operator. |
BIT_AND
The
BIT_AND aggregate function. |
BIT_OR
The
BIT_OR aggregate function. |
BIT_XOR
The
BIT_XOR aggregate function. |
CASE
CASE expression. |
CAST
The "CAST" operator, and also the PostgreSQL-style infix cast operator
"::".
|
CEIL
CEIL function. |
CHECK
CHECK constraint. |
CLASSIFIER
CLASSIFIER operator in MATCH_RECOGNIZE. |
COALESCE
COALESCE operator. |
COLLECT
The
COLLECT aggregate function. |
COLLECTION_TABLE
Table operator which converts user-defined transform into a relation, for
example,
select * from TABLE(udx(x, y, z)). |
COLUMN_DECL
Column declaration.
|
COLUMN_LIST
The non-standard constructor used to pass a
COLUMN_LIST parameter to a user-defined transform.
|
COMMIT
COMMIT session control statement. |
CONCAT2
The two-argument
CONCAT function (Oracle). |
CONTAINS
CONTAINS operator for periods. |
CORREL_VARIABLE
Reference to correlation variable.
|
COUNT
The
COUNT aggregate function. |
COUNTIF
The
COUNTIF aggregate function. |
COVAR_POP
The
COVAR_POP aggregate function. |
COVAR_SAMP
The
COVAR_SAMP aggregate function. |
CREATE_FOREIGN_SCHEMA
CREATE FOREIGN SCHEMA DDL statement. |
CREATE_FUNCTION
CREATE FUNCTION DDL statement. |
CREATE_INDEX
CREATE INDEX DDL statement. |
CREATE_MATERIALIZED_VIEW
CREATE MATERIALIZED VIEW DDL statement. |
CREATE_SCHEMA
CREATE SCHEMA DDL statement. |
CREATE_SEQUENCE
CREATE SEQUENCE DDL statement. |
CREATE_TABLE
CREATE TABLE DDL statement. |
CREATE_TYPE
CREATE TYPE DDL statement. |
CREATE_VIEW
CREATE VIEW DDL statement. |
CUBE
The internal
CUBE operator that occurs within a GROUP BY
clause. |
CUME_DIST
The
ROW_NUMBER window function. |
CURRENT_VALUE
The "CURRENT VALUE OF sequence" operator.
|
CURSOR
CURSOR constructor, for example, SELECT * FROM
TABLE(udx(CURSOR(SELECT ...), x, y, z)). |
DECODE
DECODE function (Oracle). |
DEFAULT
DEFAULT operator. |
DELETE
DELETE statement.
|
DENSE_RANK
The
DENSE_RANK window function. |
DESCENDING
DESC operator in ORDER BY. |
DESCRIBE_SCHEMA
DESCRIBE SCHEMA statement.
|
DESCRIBE_TABLE
DESCRIBE TABLE statement.
|
DESCRIPTOR
The
DESCRIPTOR(column_name, ...). |
DIVIDE
Arithmetic division operator, "/".
|
DOT
Dot.
|
DROP_FUNCTION
DROP FUNCTION DDL statement. |
DROP_INDEX
DROP INDEX DDL statement. |
DROP_MATERIALIZED_VIEW
DROP MATERIALIZED VIEW DDL statement. |
DROP_SCHEMA
DROP SCHEMA DDL statement. |
DROP_SEQUENCE
DROP SEQUENCE DDL statement. |
DROP_TABLE
DROP TABLE DDL statement. |
DROP_TYPE
DROP TYPE DDL statement. |
DROP_VIEW
DROP VIEW DDL statement. |
DRUID_BETWEEN
Variant of
BETWEEN for the Druid adapter. |
DRUID_IN
Variant of
IN for the Druid adapter. |
DRUID_NOT_IN
Variant of
NOT_IN for the Druid adapter. |
DYNAMIC_PARAM
A dynamic parameter.
|
EQUALS
Equals operator, "=".
|
ESCAPE
Escape operator (always part of LIKE or SIMILAR TO expression).
|
EXCEPT
EXCEPT relational operator (known as MINUS in some SQL
dialects). |
EXISTS
EXISTS operator. |
EXPLAIN
EXPLAIN statement.
|
EXPLICIT_TABLE
Explicit table, e.g.
|
EXTEND
The internal
EXTEND operator that qualifies a table name in the
FROM clause. |
EXTRACT
EXTRACT function. |
FIELD_ACCESS
The field access operator, ".".
|
FILTER
FILTER operator. |
FINAL
FINAL operator in MATCH_RECOGNIZE. |
FIRST
FIRST operator in MATCH_RECOGNIZE. |
FIRST_VALUE
The
FIRST_VALUE aggregate function. |
FLOOR
FLOOR function. |
FOLLOWING
FOLLOWING qualifier of an interval end-point in a window
specification. |
FOREIGN_KEY
FOREIGN KEY constraint. |
FUSION
The
FUSION aggregate function. |
GREATER_THAN
Greater-than operator, ">".
|
GREATER_THAN_OR_EQUAL
Greater-than-or-equal operator, ">=".
|
GREATEST
GREATEST function (Oracle). |
GROUP_BY_DISTINCT
The DISTINCT keyword of the GROUP BY clause.
|
GROUP_CONCAT
The
GROUP_CONCAT aggregate function. |
GROUP_ID
The
GROUP_ID() function. |
GROUPING
The
GROUPING(e, ...) function. |
GROUPING_ID
Deprecated.
Use
GROUPING. |
GROUPING_SETS
The internal
GROUPING SETS operator that occurs within a
GROUP BY clause. |
HILBERT
The
Hilbert function that converts (x, y) to a position on a
Hilbert space-filling curve. |
HINT
Sql Hint statement.
|
HOP
The
HOP group function. |
HOP_END
The
HOP_END auxiliary function of
the HOP group function. |
HOP_START
The
HOP_START auxiliary function of
the HOP group function. |
IDENTIFIER
An identifier.
|
IF
The "IF" function (BigQuery, Hive, Spark).
|
IGNORE_NULLS
IGNORE NULLS operator. |
IMMEDIATELY_PRECEDES
IMMEDIATELY PRECEDES operator for periods. |
IMMEDIATELY_SUCCEEDS
IMMEDIATELY SUCCEEDS operator for periods. |
IN
IN operator. |
INPUT_REF
Reference to an input field.
|
INSERT
INSERT statement.
|
INTERSECT
INTERSECT relational operator. |
INTERSECTION
The
INTERSECTION aggregate function. |
INTERVAL
INTERVAL expression. |
INTERVAL_QUALIFIER
Interval qualifier.
|
IS_DISTINCT_FROM
IS DISTINCT FROM operator. |
IS_FALSE
IS FALSE operator. |
IS_NOT_DISTINCT_FROM
IS NOT DISTINCT FROM operator. |
IS_NOT_FALSE
IS NOT FALSE operator. |
IS_NOT_NULL
IS NOT NULL operator. |
IS_NOT_TRUE
IS NOT TRUE operator. |
IS_NULL
IS NULL operator. |
IS_TRUE
IS TRUE operator. |
IS_UNKNOWN
IS UNKNOWN operator. |
ITEM
Item expression.
|
JDBC_FN
Call to a function using JDBC function syntax.
|
JOIN
JOIN operator or compound FROM clause.
|
JSON_ARRAYAGG
JSON_ARRAYAGG aggregate function. |
JSON_OBJECTAGG
JSON_OBJECTAGG aggregate function. |
JSON_TYPE
JSON type function. |
JSON_VALUE_EXPRESSION
JSON value expression. |
LAG
The
LAG aggregate function. |
LAST
LAST operator in MATCH_RECOGNIZE. |
LAST_VALUE
The
LAST_VALUE aggregate function. |
LATERAL
The "LATERAL" qualifier to relations in the FROM clause.
|
LEAD
The
LEAD aggregate function. |
LEAST
LEAST function (Oracle). |
LESS_THAN
Less-than operator, "<".
|
LESS_THAN_OR_EQUAL
Less-than-or-equal operator, "<=".
|
LIKE
LIKE operator. |
LISTAGG
The
LISTAGG aggregate function. |
LITERAL
A literal.
|
LITERAL_CHAIN
Literal chain operator (for composite string literals).
|
LOCAL_REF
Reference to a sub-expression computed within the current relational
operator.
|
LTRIM
LTRIM function (Oracle). |
MAP_QUERY_CONSTRUCTOR
MAP query constructor,
e.g.
|
MAP_VALUE_CONSTRUCTOR
MAP value constructor, e.g.
|
MATCH_NUMBER
MATCH_NUMBER operator in MATCH_RECOGNIZE. |
MATCH_RECOGNIZE
MATCH_RECOGNIZE clause.
|
MAX
The
MAX aggregate function. |
MERGE
MERGE statement.
|
MIN
The
MIN aggregate function. |
MINUS
Arithmetic minus operator, "-".
|
MINUS_PREFIX
Unary minus operator, as in "-1".
|
MOD
Arithmetic remainder operator, "MOD" (and "%" in some dialects).
|
MODE
The
MODE aggregate function. |
MULTISET_QUERY_CONSTRUCTOR
MULTISET query constructor. |
MULTISET_VALUE_CONSTRUCTOR
MULTISET value constructor. |
NEW_SPECIFICATION
New specification.
|
NEXT
NEXT operator in MATCH_RECOGNIZE. |
NEXT_VALUE
The "NEXT VALUE OF sequence" operator.
|
NOT
Logical
NOT operator. |
NOT_EQUALS
Not-equals operator, "!=" or "<>".
|
NOT_IN
NOT IN operator. |
NTH_VALUE
The
NTH_VALUE aggregate function. |
NTILE
The
NTILE aggregate function. |
NULLIF
NULLIF operator. |
NULLS_FIRST
NULLS FIRST clause in ORDER BY. |
NULLS_LAST
NULLS LAST clause in ORDER BY. |
NVL
NVL function (Oracle). |
OR
Logical "OR" operator.
|
ORDER_BY
ORDER BY clause.
|
OTHER
Expression not covered by any other
SqlKind value. |
OTHER_DDL
DDL statement not handled above.
|
OTHER_FUNCTION
Function that is not a special function.
|
OVER
OVER operator. |
OVERLAPS
OVERLAPS operator for periods. |
PATTERN_ALTER
Alternation operator in a pattern expression within a
MATCH_RECOGNIZE clause. |
PATTERN_CONCAT
Concatenation operator in a pattern expression within a
MATCH_RECOGNIZE clause. |
PATTERN_EXCLUDED
The special patterns to exclude enclosing pattern from output in a
MATCH_RECOGNIZE clause.
|
PATTERN_INPUT_REF
Reference to an input field, with pattern var as modifier.
|
PATTERN_PERMUTE
The internal "permute" function in a MATCH_RECOGNIZE clause.
|
PATTERN_QUANTIFIER
the repetition quantifier of a pattern factor in a match_recognize clause.
|
PERCENT_RANK
The
PERCENT_RANK window function. |
PERCENTILE_CONT
The
PERCENTILE_CONT aggregate function. |
PERCENTILE_DISC
The
PERCENTILE_DISC aggregate function. |
PERIOD_EQUALS
EQUALS operator for periods. |
PIVOT
PIVOT clause.
|
PLUS
Arithmetic plus operator, "+".
|
PLUS_PREFIX
Unary plus operator, as in "+1".
|
POSITION
POSITION function.
|
POSIX_REGEX_CASE_INSENSITIVE
~* operator (for case-insensitive POSIX-style regular
expressions). |
POSIX_REGEX_CASE_SENSITIVE
~ operator (for POSIX-style regular expressions). |
PRECEDES
PRECEDES operator for periods. |
PRECEDING
PRECEDING qualifier of an interval end-point in a window
specification. |
PREV
PREV operator in MATCH_RECOGNIZE. |
PRIMARY_KEY
PRIMARY KEY constraint. |
PROCEDURE_CALL
Procedure call.
|
RANK
The
RANK window function. |
REGR_COUNT
The
REGR_COUNT aggregate function. |
REGR_SXX
The
REGR_SXX aggregate function. |
REGR_SYY
The
REGR_SYY aggregate function. |
REINTERPRET
The internal REINTERPRET operator (meaning a reinterpret cast).
|
RESPECT_NULLS
RESPECT NULLS operator. |
REVERSE
REVERSE function (SQL Server, MySQL). |
RLIKE
RLIKE operator. |
ROLLBACK
ROLLBACK session control statement. |
ROLLUP
The internal
ROLLUP operator that occurs within a GROUP BY
clause. |
ROW
The row-constructor function.
|
ROW_NUMBER
The
ROW_NUMBER window function. |
RTRIM
RTRIM function (Oracle). |
RUNNING
FINAL operator in MATCH_RECOGNIZE. |
SCALAR_QUERY
Scalar query; that is, a sub-query used in an expression context, and
returning one row and one column.
|
SEARCH
SEARCH operator. |
SELECT
SELECT statement or sub-query.
|
SEPARATOR
SEPARATOR expression. |
SESSION
The
SESSION group function. |
SESSION_END
The
SESSION_END auxiliary function of
the SESSION group function. |
SESSION_START
The
SESSION_START auxiliary function of
the SESSION group function. |
SET_OPTION
"
ALTER scope SET option = value" statement. |
SET_SEMANTICS_TABLE
Input tables have either row semantics or set semantics.
|
SIMILAR
SIMILAR operator. |
SINGLE_VALUE
The
SINGLE_VALUE aggregate function. |
SKIP_TO_FIRST
SKIP TO FIRST qualifier of restarting point in a
MATCH_RECOGNIZE clause. |
SKIP_TO_LAST
SKIP TO LAST qualifier of restarting point in a
MATCH_RECOGNIZE clause. |
SNAPSHOT
SNAPSHOT operator.
|
SOME
SOME quantification operator (also called ANY). |
ST_CONTAINS
The
ST_Contains function that tests whether one geometry contains
another. |
ST_DWITHIN
The
ST_DWithin geo-spatial function. |
ST_MAKE_LINE
The
ST_MakeLine function that makes a line. |
ST_POINT
The
ST_Point function. |
ST_POINT3
The
ST_Point function that makes a 3D point. |
STDDEV_POP
The
STDDEV_POP aggregate function. |
STDDEV_SAMP
The
STDDEV_SAMP aggregate function. |
STRING_AGG
The
STRING_AGG aggregate function. |
SUBSTR_BIG_QUERY
SUBSTR function (BigQuery semantics). |
SUBSTR_MYSQL
SUBSTR function (MySQL semantics). |
SUBSTR_ORACLE
SUBSTR function (Oracle semantics). |
SUBSTR_POSTGRESQL
SUBSTR function (PostgreSQL semantics). |
SUCCEEDS
SUCCEEDS operator for periods. |
SUM
The
SUM aggregate function. |
SUM0
The
SUM0 aggregate function. |
TABLE_INPUT_REF
Reference to an input field, with a qualified name and an identifier.
|
TABLE_REF
Table reference.
|
TABLESAMPLE
TABLESAMPLE relational operator.
|
TIMES
Arithmetic multiplication operator, "*".
|
TIMESTAMP_ADD
TIMESTAMP_ADD function (ODBC, SQL Server, MySQL). |
TIMESTAMP_DIFF
TIMESTAMP_DIFF function (ODBC, SQL Server, MySQL). |
TRIM
TRIM function. |
TUMBLE
The
TUMBLE group function. |
TUMBLE_END
The
TUMBLE_END auxiliary function of
the TUMBLE group function. |
TUMBLE_START
The
TUMBLE_START auxiliary function of
the TUMBLE group function. |
UNION
UNION relational operator. |
UNIQUE
UNIQUE constraint. |
UNNEST
UNNEST operator. |
UNPIVOT
UNPIVOT clause.
|
UPDATE
UPDATE statement.
|
VALUES
VALUES relational operator. |
VAR_POP
The
VAR_POP aggregate function. |
VAR_SAMP
The
VAR_SAMP aggregate function. |
WINDOW
Window specification.
|
WITH
WITH clause.
|
WITH_ITEM
Item in WITH clause.
|
WITHIN_DISTINCT
WITHIN DISTINCT operator. |
WITHIN_GROUP
WITHIN GROUP operator. |
| Modifier and Type | Field and Description |
|---|---|
static EnumSet<SqlKind> |
AGGREGATE
Category consisting of all built-in aggregate functions.
|
static Set<SqlKind> |
AVG_AGG_FUNCTIONS
Category of SqlAvgAggFunction.
|
static Set<SqlKind> |
BINARY_ARITHMETIC
Category of binary arithmetic.
|
static Set<SqlKind> |
BINARY_COMPARISON
Category of binary comparison.
|
static Set<SqlKind> |
BINARY_EQUALITY
Category of binary equality.
|
static Set<SqlKind> |
COMPARISON
Category of comparison operators.
|
static Set<SqlKind> |
COVAR_AVG_AGG_FUNCTIONS
Category of SqlCovarAggFunction.
|
static EnumSet<SqlKind> |
DDL
Category consisting of all DDL operators.
|
static EnumSet<SqlKind> |
DML
Category consisting of all DML operators.
|
static Set<SqlKind> |
EXPRESSION
Category consisting of all expression operators.
|
static Set<SqlKind> |
FUNCTION
Category consisting of regular and special functions.
|
String |
lowerName
Lower-case name.
|
static EnumSet<SqlKind> |
QUERY
Category consisting of query node types.
|
static EnumSet<SqlKind> |
SET_QUERY
Category consisting of set-query node types.
|
static Set<SqlKind> |
SIMPLE_BINARY_OPS
Simple binary operators are those operators which expects operands from the same Domain.
|
String |
sql |
static Set<SqlKind> |
SYMMETRICAL
Category of operators that do not depend on the argument order.
|
static Set<SqlKind> |
SYMMETRICAL_SAME_ARG_TYPE
Category of operators that do not depend on the argument order if argument types are equal.
|
static EnumSet<SqlKind> |
TOP_LEVEL
Category of all SQL statement types.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
belongsTo(Collection<SqlKind> category)
Returns whether this
SqlKind belongs to a given category. |
SqlKind |
negate()
Returns the kind that you get if you apply NOT to this kind.
|
SqlKind |
negateNullSafe()
Returns the kind that you get if you negate this kind.
|
SqlKind |
reverse()
Returns the kind that corresponds to this operator but in the opposite
direction.
|
static SqlKind |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SqlKind[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SqlKind OTHER
SqlKind value.OTHER_FUNCTIONpublic static final SqlKind SELECT
public static final SqlKind HINT
public static final SqlKind TABLE_REF
public static final SqlKind JOIN
A FROM clause with more than one table is represented as if it were a join. For example, "FROM x, y, z" is represented as "JOIN(x, JOIN(x, y))".
public static final SqlKind IDENTIFIER
public static final SqlKind LITERAL
public static final SqlKind INTERVAL_QUALIFIER
public static final SqlKind OTHER_FUNCTION
FUNCTIONpublic static final SqlKind SET_SEMANTICS_TABLE
public static final SqlKind POSITION
public static final SqlKind EXPLAIN
public static final SqlKind DESCRIBE_SCHEMA
public static final SqlKind DESCRIBE_TABLE
public static final SqlKind INSERT
public static final SqlKind DELETE
public static final SqlKind UPDATE
public static final SqlKind SET_OPTION
ALTER scope SET option = value" statement.public static final SqlKind DYNAMIC_PARAM
public static final SqlKind GROUP_BY_DISTINCT
public static final SqlKind ORDER_BY
DESCENDING,
NULLS_FIRST,
NULLS_LASTpublic static final SqlKind WITH
public static final SqlKind WITH_ITEM
public static final SqlKind ITEM
public static final SqlKind UNION
UNION relational operator.public static final SqlKind EXCEPT
EXCEPT relational operator (known as MINUS in some SQL
dialects).public static final SqlKind INTERSECT
INTERSECT relational operator.public static final SqlKind AS
AS operator.public static final SqlKind ARGUMENT_ASSIGNMENT
=>.public static final SqlKind DEFAULT
DEFAULT operator.public static final SqlKind OVER
OVER operator.public static final SqlKind RESPECT_NULLS
RESPECT NULLS operator.public static final SqlKind IGNORE_NULLS
IGNORE NULLS operator.public static final SqlKind FILTER
FILTER operator.public static final SqlKind WITHIN_GROUP
WITHIN GROUP operator.public static final SqlKind WITHIN_DISTINCT
WITHIN DISTINCT operator.public static final SqlKind WINDOW
public static final SqlKind MERGE
public static final SqlKind TABLESAMPLE
public static final SqlKind PIVOT
public static final SqlKind UNPIVOT
public static final SqlKind MATCH_RECOGNIZE
public static final SqlKind SNAPSHOT
public static final SqlKind TIMES
public static final SqlKind DIVIDE
public static final SqlKind MOD
public static final SqlKind PLUS
PLUS_PREFIXpublic static final SqlKind MINUS
MINUS_PREFIXpublic static final SqlKind PATTERN_ALTER
MATCH_RECOGNIZE clause.public static final SqlKind PATTERN_CONCAT
MATCH_RECOGNIZE clause.public static final SqlKind IN
IN operator.public static final SqlKind NOT_IN
NOT IN operator.
Only occurs in SqlNode trees. Is expanded to NOT(IN ...) before entering RelNode land.
public static final SqlKind DRUID_IN
IN for the Druid adapter.public static final SqlKind DRUID_NOT_IN
NOT_IN for the Druid adapter.public static final SqlKind LESS_THAN
public static final SqlKind GREATER_THAN
public static final SqlKind LESS_THAN_OR_EQUAL
public static final SqlKind GREATER_THAN_OR_EQUAL
public static final SqlKind EQUALS
public static final SqlKind NOT_EQUALS
public static final SqlKind IS_DISTINCT_FROM
IS DISTINCT FROM operator.public static final SqlKind IS_NOT_DISTINCT_FROM
IS NOT DISTINCT FROM operator.public static final SqlKind SEARCH
SEARCH operator. (Analogous to scalar IN, used only in
RexNode, not SqlNode.)public static final SqlKind OR
public static final SqlKind AND
public static final SqlKind DOT
public static final SqlKind OVERLAPS
OVERLAPS operator for periods.public static final SqlKind CONTAINS
CONTAINS operator for periods.public static final SqlKind PRECEDES
PRECEDES operator for periods.public static final SqlKind IMMEDIATELY_PRECEDES
IMMEDIATELY PRECEDES operator for periods.public static final SqlKind SUCCEEDS
SUCCEEDS operator for periods.public static final SqlKind IMMEDIATELY_SUCCEEDS
IMMEDIATELY SUCCEEDS operator for periods.public static final SqlKind PERIOD_EQUALS
EQUALS operator for periods.public static final SqlKind LIKE
LIKE operator.public static final SqlKind RLIKE
RLIKE operator.public static final SqlKind SIMILAR
SIMILAR operator.public static final SqlKind POSIX_REGEX_CASE_SENSITIVE
~ operator (for POSIX-style regular expressions).public static final SqlKind POSIX_REGEX_CASE_INSENSITIVE
~* operator (for case-insensitive POSIX-style regular
expressions).public static final SqlKind BETWEEN
BETWEEN operator.public static final SqlKind DRUID_BETWEEN
BETWEEN for the Druid adapter.public static final SqlKind CASE
CASE expression.public static final SqlKind INTERVAL
INTERVAL expression.public static final SqlKind SEPARATOR
SEPARATOR expression.public static final SqlKind NULLIF
NULLIF operator.public static final SqlKind COALESCE
COALESCE operator.public static final SqlKind DECODE
DECODE function (Oracle).public static final SqlKind NVL
NVL function (Oracle).public static final SqlKind GREATEST
GREATEST function (Oracle).public static final SqlKind CONCAT2
CONCAT function (Oracle).public static final SqlKind IF
public static final SqlKind LEAST
LEAST function (Oracle).public static final SqlKind TIMESTAMP_ADD
TIMESTAMP_ADD function (ODBC, SQL Server, MySQL).public static final SqlKind TIMESTAMP_DIFF
TIMESTAMP_DIFF function (ODBC, SQL Server, MySQL).public static final SqlKind NOT
NOT operator.public static final SqlKind MINUS_PREFIX
MINUSpublic static final SqlKind EXISTS
EXISTS operator.public static final SqlKind SOME
SOME quantification operator (also called ANY).public static final SqlKind ALL
ALL quantification operator.public static final SqlKind VALUES
VALUES relational operator.public static final SqlKind EXPLICIT_TABLE
public static final SqlKind SCALAR_QUERY
public static final SqlKind PROCEDURE_CALL
public static final SqlKind NEW_SPECIFICATION
public static final SqlKind FINAL
FINAL operator in MATCH_RECOGNIZE.public static final SqlKind RUNNING
FINAL operator in MATCH_RECOGNIZE.public static final SqlKind PREV
PREV operator in MATCH_RECOGNIZE.public static final SqlKind NEXT
NEXT operator in MATCH_RECOGNIZE.public static final SqlKind FIRST
FIRST operator in MATCH_RECOGNIZE.public static final SqlKind LAST
LAST operator in MATCH_RECOGNIZE.public static final SqlKind CLASSIFIER
CLASSIFIER operator in MATCH_RECOGNIZE.public static final SqlKind MATCH_NUMBER
MATCH_NUMBER operator in MATCH_RECOGNIZE.public static final SqlKind SKIP_TO_FIRST
SKIP TO FIRST qualifier of restarting point in a
MATCH_RECOGNIZE clause.public static final SqlKind SKIP_TO_LAST
SKIP TO LAST qualifier of restarting point in a
MATCH_RECOGNIZE clause.public static final SqlKind DESCENDING
DESC operator in ORDER BY. A parse tree, not a true
expression.public static final SqlKind NULLS_FIRST
NULLS FIRST clause in ORDER BY. A parse tree, not a true
expression.public static final SqlKind NULLS_LAST
NULLS LAST clause in ORDER BY. A parse tree, not a true
expression.public static final SqlKind IS_TRUE
IS TRUE operator.public static final SqlKind IS_FALSE
IS FALSE operator.public static final SqlKind IS_NOT_TRUE
IS NOT TRUE operator.public static final SqlKind IS_NOT_FALSE
IS NOT FALSE operator.public static final SqlKind IS_UNKNOWN
IS UNKNOWN operator.public static final SqlKind IS_NULL
IS NULL operator.public static final SqlKind IS_NOT_NULL
IS NOT NULL operator.public static final SqlKind PRECEDING
PRECEDING qualifier of an interval end-point in a window
specification.public static final SqlKind FOLLOWING
FOLLOWING qualifier of an interval end-point in a window
specification.public static final SqlKind FIELD_ACCESS
(Only used at the RexNode level; at SqlNode level, a field-access is part of an identifier.)
public static final SqlKind INPUT_REF
(Only used at the RexNode level.)
public static final SqlKind TABLE_INPUT_REF
(Only used at the RexNode level.)
public static final SqlKind PATTERN_INPUT_REF
(Only used at the RexNode level.)
public static final SqlKind LOCAL_REF
(Only used at the RexNode level.)
public static final SqlKind CORREL_VARIABLE
(Only used at the RexNode level.)
public static final SqlKind PATTERN_QUANTIFIER
public static final SqlKind ROW
VALUES 1, ROW (2).public static final SqlKind COLUMN_LIST
public static final SqlKind CAST
public static final SqlKind NEXT_VALUE
public static final SqlKind CURRENT_VALUE
public static final SqlKind FLOOR
FLOOR function.public static final SqlKind CEIL
CEIL function.public static final SqlKind TRIM
TRIM function.public static final SqlKind LTRIM
LTRIM function (Oracle).public static final SqlKind RTRIM
RTRIM function (Oracle).public static final SqlKind EXTRACT
EXTRACT function.public static final SqlKind ARRAY_CONCAT
ARRAY_CONCAT function (BigQuery semantics).public static final SqlKind ARRAY_REVERSE
ARRAY_REVERSE function (BigQuery semantics).public static final SqlKind REVERSE
REVERSE function (SQL Server, MySQL).public static final SqlKind SUBSTR_BIG_QUERY
SUBSTR function (BigQuery semantics).public static final SqlKind SUBSTR_MYSQL
SUBSTR function (MySQL semantics).public static final SqlKind SUBSTR_ORACLE
SUBSTR function (Oracle semantics).public static final SqlKind SUBSTR_POSTGRESQL
SUBSTR function (PostgreSQL semantics).public static final SqlKind JDBC_FN
public static final SqlKind MULTISET_VALUE_CONSTRUCTOR
MULTISET value constructor.public static final SqlKind MULTISET_QUERY_CONSTRUCTOR
MULTISET query constructor.public static final SqlKind JSON_VALUE_EXPRESSION
JSON value expression.public static final SqlKind JSON_ARRAYAGG
JSON_ARRAYAGG aggregate function.public static final SqlKind JSON_OBJECTAGG
JSON_OBJECTAGG aggregate function.public static final SqlKind JSON_TYPE
JSON type function.public static final SqlKind UNNEST
UNNEST operator.public static final SqlKind LATERAL
public static final SqlKind COLLECTION_TABLE
select * from TABLE(udx(x, y, z)). See also the
EXPLICIT_TABLE prefix operator.public static final SqlKind ARRAY_VALUE_CONSTRUCTOR
Array[1, 2, 3].public static final SqlKind ARRAY_QUERY_CONSTRUCTOR
Array(select deptno from dept).public static final SqlKind MAP_VALUE_CONSTRUCTOR
MAP ['washington', 1, 'obama', 44].public static final SqlKind MAP_QUERY_CONSTRUCTOR
MAP (SELECT empno, deptno FROM emp).public static final SqlKind CURSOR
CURSOR constructor, for example, SELECT * FROM
TABLE(udx(CURSOR(SELECT ...), x, y, z)).public static final SqlKind LITERAL_CHAIN
public static final SqlKind ESCAPE
public static final SqlKind REINTERPRET
public static final SqlKind EXTEND
EXTEND operator that qualifies a table name in the
FROM clause.public static final SqlKind CUBE
CUBE operator that occurs within a GROUP BY
clause.public static final SqlKind ROLLUP
ROLLUP operator that occurs within a GROUP BY
clause.public static final SqlKind GROUPING_SETS
GROUPING SETS operator that occurs within a
GROUP BY clause.public static final SqlKind GROUPING
GROUPING(e, ...) function.@Deprecated public static final SqlKind GROUPING_ID
GROUPING.public static final SqlKind GROUP_ID
GROUP_ID() function.public static final SqlKind PATTERN_PERMUTE
public static final SqlKind PATTERN_EXCLUDED
public static final SqlKind COUNT
COUNT aggregate function.public static final SqlKind SUM
SUM aggregate function.public static final SqlKind SUM0
SUM0 aggregate function.public static final SqlKind MIN
MIN aggregate function.public static final SqlKind MAX
MAX aggregate function.public static final SqlKind LEAD
LEAD aggregate function.public static final SqlKind LAG
LAG aggregate function.public static final SqlKind FIRST_VALUE
FIRST_VALUE aggregate function.public static final SqlKind LAST_VALUE
LAST_VALUE aggregate function.public static final SqlKind ANY_VALUE
ANY_VALUE aggregate function.public static final SqlKind COVAR_POP
COVAR_POP aggregate function.public static final SqlKind COVAR_SAMP
COVAR_SAMP aggregate function.public static final SqlKind REGR_COUNT
REGR_COUNT aggregate function.public static final SqlKind REGR_SXX
REGR_SXX aggregate function.public static final SqlKind REGR_SYY
REGR_SYY aggregate function.public static final SqlKind AVG
AVG aggregate function.public static final SqlKind STDDEV_POP
STDDEV_POP aggregate function.public static final SqlKind STDDEV_SAMP
STDDEV_SAMP aggregate function.public static final SqlKind VAR_POP
VAR_POP aggregate function.public static final SqlKind VAR_SAMP
VAR_SAMP aggregate function.public static final SqlKind NTILE
NTILE aggregate function.public static final SqlKind NTH_VALUE
NTH_VALUE aggregate function.public static final SqlKind LISTAGG
LISTAGG aggregate function.public static final SqlKind STRING_AGG
STRING_AGG aggregate function.public static final SqlKind COUNTIF
COUNTIF aggregate function.public static final SqlKind ARRAY_AGG
ARRAY_AGG aggregate function.public static final SqlKind ARRAY_CONCAT_AGG
ARRAY_CONCAT_AGG aggregate function.public static final SqlKind GROUP_CONCAT
GROUP_CONCAT aggregate function.public static final SqlKind COLLECT
COLLECT aggregate function.public static final SqlKind MODE
MODE aggregate function.public static final SqlKind PERCENTILE_CONT
PERCENTILE_CONT aggregate function.public static final SqlKind PERCENTILE_DISC
PERCENTILE_DISC aggregate function.public static final SqlKind FUSION
FUSION aggregate function.public static final SqlKind INTERSECTION
INTERSECTION aggregate function.public static final SqlKind SINGLE_VALUE
SINGLE_VALUE aggregate function.public static final SqlKind BIT_AND
BIT_AND aggregate function.public static final SqlKind BIT_OR
BIT_OR aggregate function.public static final SqlKind BIT_XOR
BIT_XOR aggregate function.public static final SqlKind ROW_NUMBER
ROW_NUMBER window function.public static final SqlKind RANK
RANK window function.public static final SqlKind PERCENT_RANK
PERCENT_RANK window function.public static final SqlKind DENSE_RANK
DENSE_RANK window function.public static final SqlKind CUME_DIST
ROW_NUMBER window function.public static final SqlKind DESCRIPTOR
DESCRIPTOR(column_name, ...).public static final SqlKind TUMBLE
TUMBLE group function.public static final SqlKind TUMBLE_START
TUMBLE_START auxiliary function of
the TUMBLE group function.public static final SqlKind TUMBLE_END
TUMBLE_END auxiliary function of
the TUMBLE group function.public static final SqlKind HOP
HOP group function.public static final SqlKind HOP_START
HOP_START auxiliary function of
the HOP group function.public static final SqlKind HOP_END
HOP_END auxiliary function of
the HOP group function.public static final SqlKind SESSION
SESSION group function.public static final SqlKind SESSION_START
SESSION_START auxiliary function of
the SESSION group function.public static final SqlKind SESSION_END
SESSION_END auxiliary function of
the SESSION group function.public static final SqlKind COLUMN_DECL
public static final SqlKind ATTRIBUTE_DEF
public static final SqlKind CHECK
CHECK constraint.public static final SqlKind UNIQUE
UNIQUE constraint.public static final SqlKind PRIMARY_KEY
PRIMARY KEY constraint.public static final SqlKind FOREIGN_KEY
FOREIGN KEY constraint.public static final SqlKind ST_DWITHIN
ST_DWithin geo-spatial function.public static final SqlKind ST_POINT
ST_Point function.public static final SqlKind ST_POINT3
ST_Point function that makes a 3D point.public static final SqlKind ST_MAKE_LINE
ST_MakeLine function that makes a line.public static final SqlKind ST_CONTAINS
ST_Contains function that tests whether one geometry contains
another.public static final SqlKind HILBERT
Hilbert function that converts (x, y) to a position on a
Hilbert space-filling curve.public static final SqlKind COMMIT
COMMIT session control statement.public static final SqlKind ROLLBACK
ROLLBACK session control statement.public static final SqlKind ALTER_SESSION
ALTER SESSION DDL statement.public static final SqlKind CREATE_SCHEMA
CREATE SCHEMA DDL statement.public static final SqlKind CREATE_FOREIGN_SCHEMA
CREATE FOREIGN SCHEMA DDL statement.public static final SqlKind DROP_SCHEMA
DROP SCHEMA DDL statement.public static final SqlKind CREATE_TABLE
CREATE TABLE DDL statement.public static final SqlKind ALTER_TABLE
ALTER TABLE DDL statement.public static final SqlKind DROP_TABLE
DROP TABLE DDL statement.public static final SqlKind CREATE_VIEW
CREATE VIEW DDL statement.public static final SqlKind ALTER_VIEW
ALTER VIEW DDL statement.public static final SqlKind DROP_VIEW
DROP VIEW DDL statement.public static final SqlKind CREATE_MATERIALIZED_VIEW
CREATE MATERIALIZED VIEW DDL statement.public static final SqlKind ALTER_MATERIALIZED_VIEW
ALTER MATERIALIZED VIEW DDL statement.public static final SqlKind DROP_MATERIALIZED_VIEW
DROP MATERIALIZED VIEW DDL statement.public static final SqlKind CREATE_SEQUENCE
CREATE SEQUENCE DDL statement.public static final SqlKind ALTER_SEQUENCE
ALTER SEQUENCE DDL statement.public static final SqlKind DROP_SEQUENCE
DROP SEQUENCE DDL statement.public static final SqlKind CREATE_INDEX
CREATE INDEX DDL statement.public static final SqlKind ALTER_INDEX
ALTER INDEX DDL statement.public static final SqlKind DROP_INDEX
DROP INDEX DDL statement.public static final SqlKind CREATE_TYPE
CREATE TYPE DDL statement.public static final SqlKind DROP_TYPE
DROP TYPE DDL statement.public static final SqlKind CREATE_FUNCTION
CREATE FUNCTION DDL statement.public static final SqlKind DROP_FUNCTION
DROP FUNCTION DDL statement.public static final SqlKind OTHER_DDL
Note to other projects: If you are extending Calcite's SQL parser and have your own object types you no doubt want to define CREATE and DROP commands for them. Use OTHER_DDL in the short term, but we are happy to add new enum values for your object types. Just ask!
public static final EnumSet<SqlKind> AGGREGATE
public static final EnumSet<SqlKind> DML
Consists of:
INSERT,
UPDATE,
DELETE,
MERGE,
PROCEDURE_CALL.
NOTE jvs 1-June-2006: For now we treat procedure calls as DML; this makes it easy for JDBC clients to call execute or executeUpdate and not have to process dummy cursor results. If in the future we support procedures which return results sets, we'll need to refine this.
public static final Set<SqlKind> EXPRESSION
A node is an expression if it is NOT one of the following:
AS,
ARGUMENT_ASSIGNMENT,
DEFAULT,
DESCENDING,
SELECT,
JOIN,
OTHER_FUNCTION,
CAST,
TRIM,
LITERAL_CHAIN,
JDBC_FN,
PRECEDING,
FOLLOWING,
ORDER_BY,
COLLECTION_TABLE,
TABLESAMPLE,
UNNEST
or an aggregate function, DML or DDL.
public static final Set<SqlKind> AVG_AGG_FUNCTIONS
Consists of AVG, STDDEV_POP, STDDEV_SAMP,
VAR_POP, VAR_SAMP.
public static final Set<SqlKind> COVAR_AVG_AGG_FUNCTIONS
Consists of COVAR_POP, COVAR_SAMP, REGR_SXX,
REGR_SYY.
public static final Set<SqlKind> COMPARISON
Consists of:
IN,
EQUALS,
NOT_EQUALS,
LESS_THAN,
GREATER_THAN,
LESS_THAN_OR_EQUAL,
GREATER_THAN_OR_EQUAL.
public static final Set<SqlKind> BINARY_EQUALITY
Consists of:
EQUALS
NOT_EQUALS
public static final Set<SqlKind> BINARY_COMPARISON
Consists of:
EQUALS
NOT_EQUALS
GREATER_THAN
GREATER_THAN_OR_EQUAL
LESS_THAN
LESS_THAN_OR_EQUAL
IS_DISTINCT_FROM
IS_NOT_DISTINCT_FROM
@API(since="1.22",
status=EXPERIMENTAL)
public static final Set<SqlKind> SYMMETRICAL_SAME_ARG_TYPE
@API(since="1.24",
status=EXPERIMENTAL)
public static final Set<SqlKind> SIMPLE_BINARY_OPS
Example: simple comparisons (=, <).
Note: it does not contain IN because that is defined on D x D^n.
public final String lowerName
public final String sql
public static SqlKind[] values()
for (SqlKind c : SqlKind.values()) System.out.println(c);
public static SqlKind valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic SqlKind reverse()
For example, GREATER_THAN.reverse() returns LESS_THAN.
public SqlKind negate()
For example, IS_NOT_NULL.negate() returns IS_NULL.
For IS_TRUE, IS_FALSE, IS_NOT_TRUE,
IS_NOT_FALSE, nullable inputs need to be treated carefully.
NOT(IS_TRUE(null)) = NOT(false) = true,
while IS_FALSE(null) = false,
so NOT(IS_TRUE(X)) should be IS_NOT_TRUE(X).
On the other hand,
IS_TRUE(NOT(null)) = IS_TRUE(null) = false.
This is why negate() != negateNullSafe() for these operators.
public SqlKind negateNullSafe()
For IS_TRUE, IS_FALSE, IS_NOT_TRUE and
IS_NOT_FALSE, nullable inputs need to be treated carefully:
public final boolean belongsTo(Collection<SqlKind> category)
SqlKind belongs to a given category.
A category is a collection of kinds, not necessarily disjoint. For example, QUERY is { SELECT, UNION, INTERSECT, EXCEPT, VALUES, ORDER_BY, EXPLICIT_TABLE }.
category - CategoryCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.