public class SqlStdOperatorTable extends ReflectiveSqlOperatorTable
SqlOperatorTable containing
the standard operators and functions.| Modifier and Type | Field and Description |
|---|---|
static SqlFunction |
ABS |
static SqlFunction |
ACOS |
static SqlQuantifyOperator |
ALL_EQ |
static SqlQuantifyOperator |
ALL_GE |
static SqlQuantifyOperator |
ALL_GT |
static SqlQuantifyOperator |
ALL_LE |
static SqlQuantifyOperator |
ALL_LT
The
< ALL operator. |
static SqlQuantifyOperator |
ALL_NE |
static SqlBinaryOperator |
AND
Logical
AND operator. |
static SqlAggFunction |
APPROX_COUNT_DISTINCT
APPROX_COUNT_DISTINCT aggregate function. |
static SqlSpecialOperator |
ARGUMENT_ASSIGNMENT
ARGUMENT_ASSIGNMENT operator (=<)
assigns an argument to a function call to a particular named parameter. |
static SqlMultisetQueryConstructor |
ARRAY_QUERY
The ARRAY Query Constructor.
|
static SqlArrayValueConstructor |
ARRAY_VALUE_CONSTRUCTOR
The ARRAY Value Constructor.
|
static SqlAsOperator |
AS
AS operator associates an expression in the SELECT clause
with an alias. |
static SqlFunction |
ASIN |
static SqlFunction |
ATAN |
static SqlFunction |
ATAN2 |
static SqlAggFunction |
AVG
AVG aggregate function. |
static SqlBetweenOperator |
BETWEEN |
static SqlFunction |
CARDINALITY
The CARDINALITY operator, used to retrieve the number of elements in a
MULTISET, ARRAY or MAP.
|
static SqlCaseOperator |
CASE |
static SqlFunction |
CAST
The SQL
CAST operator. |
static SqlFunction |
CEIL
The
CEIL function. |
static SqlFunction |
CHAR_LENGTH |
static SqlFunction |
CHARACTER_LENGTH |
static SqlFunction |
CLASSIFIER
CLASSIFIER function to be used within MATCH_RECOGNIZE. |
static SqlFunction |
COALESCE
The COALESCE builtin function.
|
static SqlAggFunction |
COLLECT
The COLLECT operator.
|
static SqlSpecialOperator |
COLLECTION_TABLE
The "table function derived table" operator, which a table-valued
function into a relation, e.g.
|
static SqlColumnListConstructor |
COLUMN_LIST
The COLUMN_LIST constructor.
|
static SqlBinaryOperator |
CONCAT
String concatenation operator, '
||'. |
static SqlOverlapsOperator |
CONTAINS |
static SqlFunction |
CONVERT |
static SqlFunction |
COS |
static SqlFunction |
COT |
static SqlAggFunction |
COUNT
COUNT aggregate function. |
static SqlAggFunction |
COVAR_POP
COVAR_POP aggregate function. |
static SqlAggFunction |
COVAR_SAMP
COVAR_SAMP aggregate function. |
static SqlInternalOperator |
CUBE
CUBE operator, occurs within GROUP BY clause
or nested within a GROUPING SETS. |
static SqlRankFunction |
CUME_DIST
CUME_DIST window function. |
static SqlFunction |
CURRENT_CATALOG
The
CURRENT_CATALOG function. |
static SqlFunction |
CURRENT_DATE
The
CURRENT_DATE function. |
static SqlFunction |
CURRENT_PATH
The
CURRENT_PATH function. |
static SqlFunction |
CURRENT_ROLE
The
CURRENT_ROLE function. |
static SqlFunction |
CURRENT_SCHEMA
The
CURRENT_SCHEMA function. |
static SqlFunction |
CURRENT_TIME
The
CURRENT_TIME [(precision)] function. |
static SqlFunction |
CURRENT_TIMESTAMP
The
CURRENT_TIMESTAMP [(precision)] function. |
static SqlFunction |
CURRENT_USER
The
CURRENT_USER function. |
static SqlOperator |
CURRENT_VALUE
The sequence current value function:
CURRENT VALUE FOR
sequence |
static SqlCursorConstructor |
CURSOR
The CURSOR constructor.
|
static SqlSpecialOperator |
DATETIME_PLUS
Infix datetime plus operator, '
DATETIME + INTERVAL'. |
static SqlDatePartFunction |
DAYOFMONTH
The SQL
DAYOFMONTH operator. |
static SqlDatePartFunction |
DAYOFWEEK
The SQL
DAYOFWEEK operator. |
static SqlDatePartFunction |
DAYOFYEAR
The SQL
DAYOFYEAR operator. |
static SqlSpecialOperator |
DEFAULT
DEFAULT operator indicates that an argument to a function call
is to take its default value.. |
static SqlFunction |
DEGREES |
static SqlRankFunction |
DENSE_RANK
DENSE_RANK window function. |
static SqlPostfixOperator |
DESC |
static SqlBinaryOperator |
DIVIDE
Arithmetic division operator, '
/'. |
static SqlBinaryOperator |
DIVIDE_INTEGER
Internal integer arithmetic division operator, '
/INT'. |
static SqlOperator |
DOT
Dot operator, '
.', used for referencing fields of records. |
static SqlFunction |
ELEMENT
The ELEMENT operator, used to convert a multiset with only one item to a
"regular" type.
|
static SqlInternalOperator |
ELEMENT_SLICE
The internal "$ELEMENT_SLICE" operator returns the first field of the
only element of a multiset.
|
static SqlBinaryOperator |
EQUALS
Logical equals operator, '
='. |
static SqlSpecialOperator |
ESCAPE
Internal operator used to represent the ESCAPE clause of a LIKE or
SIMILAR TO expression.
|
static SqlSetOperator |
EXCEPT |
static SqlSetOperator |
EXCEPT_ALL |
static SqlPrefixOperator |
EXISTS |
static SqlFunction |
EXP |
static SqlPrefixOperator |
EXPLICIT_TABLE
Keyword which allows an identifier to be explicitly flagged as a table.
|
static SqlInternalOperator |
EXTEND
EXTEND operator. |
static SqlFunction |
EXTRACT
The SQL
EXTRACT operator. |
static SqlFilterOperator |
FILTER
FILTER operator filters which rows are included in an
aggregate function. |
static SqlPrefixOperator |
FINAL
FINAL function to be used within MATCH_RECOGNIZE. |
static SqlFunction |
FIRST
FIRST function to be used within MATCH_RECOGNIZE. |
static SqlAggFunction |
FIRST_VALUE
FIRST_VALUE aggregate function. |
static SqlFunction |
FLOOR
The
FLOOR function. |
static SqlFunction |
FUSION
The FUSION operator.
|
static SqlBinaryOperator |
GREATER_THAN
Logical greater-than operator, '
>'. |
static SqlBinaryOperator |
GREATER_THAN_OR_EQUAL
Logical greater-than-or-equal operator, '
>='. |
static SqlGroupIdFunction |
GROUP_ID
GROUP_ID() function. |
static SqlGroupingFunction |
GROUPING
GROUPING(c1 [, c2, ...]) function. |
static SqlGroupingFunction |
GROUPING_ID
GROUPING_ID function is a synonym for GROUPING. |
static SqlInternalOperator |
GROUPING_SETS
GROUPING SETS operator, occurs within GROUP BY clause
or nested within a GROUPING SETS. |
static SqlAggFunction |
HISTOGRAM_AGG
HISTOGRAM aggregate function support. |
static SqlFunction |
HISTOGRAM_FIRST_VALUE
HISTOGRAM_FIRST_VALUE window aggregate function. |
static SqlFunction |
HISTOGRAM_LAST_VALUE
HISTOGRAM_LAST_VALUE window aggregate function. |
static SqlFunction |
HISTOGRAM_MAX
HISTOGRAM_MAX window aggregate function. |
static SqlFunction |
HISTOGRAM_MIN
HISTOGRAM_MIN window aggregate function. |
static SqlGroupedWindowFunction |
HOP
The
HOP group function. |
static SqlGroupedWindowFunction |
HOP_END
The
HOP_END auxiliary function of
the HOP group function. |
static SqlGroupedWindowFunction |
HOP_START
The
HOP_START auxiliary function of
the HOP group function. |
static SqlDatePartFunction |
HOUR
The SQL
HOUR operator. |
static SqlOverlapsOperator |
IMMEDIATELY_PRECEDES |
static SqlOverlapsOperator |
IMMEDIATELY_SUCCEEDS |
static SqlBinaryOperator |
IN
IN operator tests for a value's membership in a sub-query or
a list of values. |
static SqlFunction |
IN_FENNEL
Use of the
IN_FENNEL operator forces the argument to be
evaluated in Fennel. |
static SqlFunction |
INITCAP |
private static SqlStdOperatorTable |
instance
The standard operator table.
|
static SqlSetOperator |
INTERSECT |
static SqlSetOperator |
INTERSECT_ALL |
static SqlPostfixOperator |
IS_A_SET |
static SqlBinaryOperator |
IS_DIFFERENT_FROM
The internal
$IS_DIFFERENT_FROM operator is the same as the
user-level IS_DISTINCT_FROM in all respects except that
the test for equality on character datatypes treats trailing spaces as
significant. |
static SqlBinaryOperator |
IS_DISTINCT_FROM
IS DISTINCT FROM operator. |
static SqlPostfixOperator |
IS_FALSE |
static SqlBinaryOperator |
IS_NOT_DISTINCT_FROM
IS NOT DISTINCT FROM operator. |
static SqlPostfixOperator |
IS_NOT_FALSE |
static SqlPostfixOperator |
IS_NOT_NULL |
static SqlPostfixOperator |
IS_NOT_TRUE |
static SqlPostfixOperator |
IS_NOT_UNKNOWN |
static SqlPostfixOperator |
IS_NULL |
static SqlPostfixOperator |
IS_TRUE |
static SqlPostfixOperator |
IS_UNKNOWN |
static SqlOperator |
ITEM
The item operator {@code [ ...
|
static SqlAggFunction |
LAG
LAG aggregate function. |
static SqlFunction |
LAST
LAST function to be used within MATCH_RECOGNIZE. |
static SqlAggFunction |
LAST_VALUE
LAST_VALUE aggregate function. |
static SqlSpecialOperator |
LATERAL
The
LATERAL operator. |
static SqlAggFunction |
LEAD
LEAD aggregate function. |
static SqlBinaryOperator |
LESS_THAN
Logical less-than operator, '
<'. |
static SqlBinaryOperator |
LESS_THAN_OR_EQUAL
Logical less-than-or-equal operator, '
<='. |
static SqlSpecialOperator |
LIKE |
static SqlLiteralChainOperator |
LITERAL_CHAIN |
static SqlFunction |
LN |
static SqlFunction |
LOCALTIME
The
LOCALTIME [(precision)] function. |
static SqlFunction |
LOCALTIMESTAMP
The
LOCALTIMESTAMP [(precision)] function. |
static SqlFunction |
LOG10 |
static SqlFunction |
LOWER |
static SqlMultisetQueryConstructor |
MAP_QUERY
The MAP Query Constructor.
|
static SqlMapValueConstructor |
MAP_VALUE_CONSTRUCTOR
The MAP Value Constructor,
e.g.
|
static SqlFunction |
MATCH_NUMBER
MATCH_NUMBER function to be used within MATCH_RECOGNIZE. |
static SqlAggFunction |
MAX
MAX aggregate function. |
static SqlBinaryOperator |
MEMBER_OF
Multiset
MEMBER OF, which returns whether a element belongs to a
multiset. |
static SqlAggFunction |
MIN
MIN aggregate function. |
static SqlBinaryOperator |
MINUS
Infix arithmetic minus operator, '
-'. |
static SqlDatetimeSubtractionOperator |
MINUS_DATE
A special operator for the subtraction of two DATETIMEs.
|
static SqlDatePartFunction |
MINUTE
The SQL
MINUTE operator. |
static SqlFunction |
MOD
Arithmetic remainder function
MOD. |
static SqlDatePartFunction |
MONTH
The SQL
MONTH operator. |
static SqlBinaryOperator |
MULTIPLY
Arithmetic multiplication operator, '
*'. |
static SqlMultisetSetOperator |
MULTISET_EXCEPT
The "MULTISET EXCEPT" operator.
|
static SqlMultisetSetOperator |
MULTISET_EXCEPT_ALL
The "MULTISET EXCEPT ALL" operator.
|
static SqlMultisetSetOperator |
MULTISET_INTERSECT
The "MULTISET INTERSECT" operator.
|
static SqlMultisetSetOperator |
MULTISET_INTERSECT_ALL
The "MULTISET INTERSECT ALL" operator.
|
static SqlMultisetQueryConstructor |
MULTISET_QUERY
The MULTISET Query Constructor.
|
static SqlMultisetSetOperator |
MULTISET_UNION
The "MULTISET UNION" operator.
|
static SqlMultisetSetOperator |
MULTISET_UNION_ALL
The "MULTISET UNION ALL" operator.
|
static SqlMultisetValueConstructor |
MULTISET_VALUE
The MULTISET Value Constructor.
|
static SqlOperator |
NEW |
static SqlFunction |
NEXT
NEXT function to be used within MATCH_RECOGNIZE. |
static SqlOperator |
NEXT_VALUE
The sequence next value function:
NEXT VALUE FOR sequence |
static SqlPrefixOperator |
NOT |
static SqlBetweenOperator |
NOT_BETWEEN |
static SqlBinaryOperator |
NOT_EQUALS
Logical not-equals operator, '
<>'. |
static SqlBinaryOperator |
NOT_IN
NOT IN operator tests for a value's membership in a sub-query
or a list of values. |
static SqlSpecialOperator |
NOT_LIKE |
static SqlSpecialOperator |
NOT_SIMILAR_TO |
static SqlAggFunction |
NTILE
NTILE aggregate function. |
static SqlFunction |
NULLIF |
static SqlPostfixOperator |
NULLS_FIRST |
static SqlPostfixOperator |
NULLS_LAST |
static SqlBinaryOperator |
OR
Logical
OR operator. |
static SqlBinaryOperator |
OVER
The
OVER operator, which applies an aggregate functions to a
window. |
static SqlOverlapsOperator |
OVERLAPS |
static SqlFunction |
OVERLAY |
static SqlBinaryOperator |
PATTERN_ALTER
| operator to create alternate patterns
within MATCH_RECOGNIZE. |
static SqlBinaryOperator |
PATTERN_CONCAT
Operator to concatenate patterns within
MATCH_RECOGNIZE. |
static SqlSpecialOperator |
PATTERN_EXCLUDE
EXCLUDE operator within MATCH_RECOGNIZE. |
static SqlSpecialOperator |
PATTERN_PERMUTE
PERMUTE operator to combine patterns within
MATCH_RECOGNIZE. |
static SqlSpecialOperator |
PATTERN_QUANTIFIER
Operator to quantify patterns within
MATCH_RECOGNIZE. |
static SqlRankFunction |
PERCENT_RANK
PERCENT_RANK window function. |
static SqlBinaryOperator |
PERCENT_REMAINDER
Arithmetic remainder operator, '
%',
an alternative to MOD allowed if under certain conformance levels. |
static SqlOverlapsOperator |
PERIOD_EQUALS |
static SqlFunction |
PI |
static SqlBinaryOperator |
PLUS
Infix arithmetic plus operator, '
+'. |
static SqlFunction |
POSITION |
static SqlFunction |
POWER
Uses SqlOperatorTable.useDouble for its return type since we don't know
what the result type will be by just looking at the operand types.
|
static SqlOverlapsOperator |
PRECEDES |
static SqlFunction |
PREV
PREV function to be used within MATCH_RECOGNIZE. |
static SqlOperator |
PROCEDURE_CALL |
static SqlDatePartFunction |
QUARTER
The SQL
QUARTER operator. |
static SqlFunction |
RADIANS |
static SqlRandFunction |
RAND
The
RAND([seed]) function, which yields a random double,
optionally with seed. |
static SqlRandIntegerFunction |
RAND_INTEGER
The
RAND_INTEGER([seed, ] bound) function, which yields a random
integer, optionally with seed. |
static SqlRankFunction |
RANK
RANK window function. |
static SqlAggFunction |
REGR_SXX
REGR_SXX aggregate function. |
static SqlAggFunction |
REGR_SYY
REGR_SYY aggregate function. |
static SqlSpecialOperator |
REINTERPRET
An
REINTERPRET operator is internal to the planner. |
static SqlFunction |
REPLACE
The
REPLACE(string, search, replace) function. |
static SqlInternalOperator |
ROLLUP
ROLLUP operator, occurs within GROUP BY clause
or nested within a GROUPING SETS. |
static SqlFunction |
ROUND |
static SqlRowOperator |
ROW |
static SqlRankFunction |
ROW_NUMBER
ROW_NUMBER window function. |
static SqlPrefixOperator |
RUNNING
RUNNING function to be used within MATCH_RECOGNIZE. |
static SqlInternalOperator |
SCALAR_QUERY
The internal "$SCALAR_QUERY" operator returns a scalar value from a
record type.
|
static SqlDatePartFunction |
SECOND
The SQL
SECOND operator. |
static SqlGroupedWindowFunction |
SESSION
The
SESSION group function. |
static SqlGroupedWindowFunction |
SESSION_END
The
SESSION_END auxiliary function of
the SESSION group function. |
static SqlGroupedWindowFunction |
SESSION_START
The
SESSION_START auxiliary function of
the SESSION group function. |
static SqlFunction |
SESSION_USER
The
SESSION_USER function. |
static SqlFunction |
SIGN |
static SqlSpecialOperator |
SIMILAR_TO |
static SqlFunction |
SIN |
static SqlAggFunction |
SINGLE_VALUE
SINGLE_VALUE aggregate function. |
static SqlInternalOperator |
SLICE
The internal "$SLICE" operator takes a multiset of records and returns a
multiset of the first column of those records.
|
static SqlQuantifyOperator |
SOME_EQ |
static SqlQuantifyOperator |
SOME_GE |
static SqlQuantifyOperator |
SOME_GT |
static SqlQuantifyOperator |
SOME_LE |
static SqlQuantifyOperator |
SOME_LT
The
< SOME operator (synonymous with
< ANY). |
static SqlQuantifyOperator |
SOME_NE |
static SqlFunction |
SQRT |
static SqlAggFunction |
STDDEV
STDDEV aggregate function. |
static SqlAggFunction |
STDDEV_POP
STDDEV_POP aggregate function. |
static SqlAggFunction |
STDDEV_SAMP
STDDEV_SAMP aggregate function. |
static SqlBinaryOperator |
SUBMULTISET_OF
Submultiset.
|
static SqlFunction |
SUBSTRING
The character substring function:
SUBSTRING(string FROM start [FOR
length]). |
static SqlOverlapsOperator |
SUCCEEDS |
static SqlAggFunction |
SUM
SUM aggregate function. |
static SqlAggFunction |
SUM0
SUM0 aggregate function. |
static SqlBetweenOperator |
SYMMETRIC_BETWEEN |
static SqlBetweenOperator |
SYMMETRIC_NOT_BETWEEN |
static SqlFunction |
SYSTEM_USER
The
SYSTEM_USER function. |
static SqlSpecialOperator |
TABLESAMPLE
The
TABLESAMPLE operator. |
static SqlFunction |
TAN |
static SqlThrowOperator |
THROW |
static SqlFunction |
TIMESTAMP_ADD
The
TIMESTAMPADD function. |
static SqlFunction |
TIMESTAMP_DIFF
The
TIMESTAMPDIFF function. |
static SqlFunction |
TRANSLATE
The
TRANSLATE(char_value USING translation_name) function
alters the character set of a string value from one base character set to another. |
static SqlFunction |
TRIM
The "TRIM" function.
|
static SqlFunction |
TRUNCATE |
static SqlGroupedWindowFunction |
TUMBLE
The
TUMBLE group function. |
static SqlGroupedWindowFunction |
TUMBLE_END
The
TUMBLE_END auxiliary function of
the TUMBLE group function. |
static SqlGroupedWindowFunction |
TUMBLE_START
The
TUMBLE_START auxiliary function of
the TUMBLE group function. |
static SqlPrefixOperator |
UNARY_MINUS
Prefix arithmetic minus operator, '
-'. |
static SqlPrefixOperator |
UNARY_PLUS
Prefix arithmetic plus operator, '
+'. |
static SqlSetOperator |
UNION |
static SqlSetOperator |
UNION_ALL |
static SqlUnnestOperator |
UNNEST
The
UNNEST operator. |
static SqlUnnestOperator |
UNNEST_WITH_ORDINALITY
The
UNNEST WITH ORDINALITY operator. |
static SqlFunction |
UPPER |
static SqlFunction |
USER
The
USER function. |
static SqlSpecialOperator |
VALUES |
static SqlAggFunction |
VAR_POP
VAR_POP aggregate function. |
static SqlAggFunction |
VAR_SAMP
VAR_SAMP aggregate function. |
static SqlAggFunction |
VARIANCE
VARIANCE aggregate function. |
static SqlDatePartFunction |
WEEK
The SQL
WEEK operator. |
static SqlDatePartFunction |
YEAR
The SQL
YEAR operator. |
IS_NAME| Constructor and Description |
|---|
SqlStdOperatorTable() |
| Modifier and Type | Method and Description |
|---|---|
static SqlQuantifyOperator |
all(SqlKind comparisonKind)
Returns the operator for
ALL comparisonKind. |
static SqlGroupedWindowFunction |
auxiliaryToGroup(SqlKind kind)
Returns the group function for which a given kind is an auxiliary
function, or null if it is not an auxiliary function.
|
static SqlCall |
convertAuxiliaryToGroupCall(SqlCall call)
Converts a call to a grouped auxiliary function
to a call to the grouped window function.
|
static List<Pair<SqlNode,AuxiliaryConverter>> |
convertGroupToAuxiliaryCalls(SqlCall call)
Converts a call to a grouped window function to a call to its auxiliary
window function(s).
|
private static SqlCall |
copy(SqlCall call,
SqlOperator operator)
Creates a copy of a call with a new operator.
|
static SqlStdOperatorTable |
instance()
Returns the standard operator table, creating it if necessary.
|
static SqlQuantifyOperator |
some(SqlKind comparisonKind)
Returns the operator for
SOME comparisonKind. |
getOperatorList, init, lookupOperatorOverloads, registerprivate static SqlStdOperatorTable instance
public static final SqlSetOperator UNION
public static final SqlSetOperator UNION_ALL
public static final SqlSetOperator EXCEPT
public static final SqlSetOperator EXCEPT_ALL
public static final SqlSetOperator INTERSECT
public static final SqlSetOperator INTERSECT_ALL
public static final SqlMultisetSetOperator MULTISET_UNION
public static final SqlMultisetSetOperator MULTISET_UNION_ALL
public static final SqlMultisetSetOperator MULTISET_EXCEPT
public static final SqlMultisetSetOperator MULTISET_EXCEPT_ALL
public static final SqlMultisetSetOperator MULTISET_INTERSECT
public static final SqlMultisetSetOperator MULTISET_INTERSECT_ALL
public static final SqlBinaryOperator AND
AND operator.public static final SqlAsOperator AS
AS operator associates an expression in the SELECT clause
with an alias.public static final SqlSpecialOperator ARGUMENT_ASSIGNMENT
ARGUMENT_ASSIGNMENT operator (=<)
assigns an argument to a function call to a particular named parameter.public static final SqlSpecialOperator DEFAULT
DEFAULT operator indicates that an argument to a function call
is to take its default value..public static final SqlFilterOperator FILTER
FILTER operator filters which rows are included in an
aggregate function.public static final SqlInternalOperator CUBE
CUBE operator, occurs within GROUP BY clause
or nested within a GROUPING SETS.public static final SqlInternalOperator ROLLUP
ROLLUP operator, occurs within GROUP BY clause
or nested within a GROUPING SETS.public static final SqlInternalOperator GROUPING_SETS
GROUPING SETS operator, occurs within GROUP BY clause
or nested within a GROUPING SETS.public static final SqlGroupingFunction GROUPING
GROUPING(c1 [, c2, ...]) function.
Occurs in similar places to an aggregate
function (SELECT, HAVING clause, etc. of an aggregate
query), but not technically an aggregate function.
public static final SqlGroupIdFunction GROUP_ID
GROUP_ID() function. (Oracle-specific.)public static final SqlGroupingFunction GROUPING_ID
GROUPING_ID function is a synonym for GROUPING.
Some history. The GROUPING function is in the SQL standard,
and originally supported only one argument. GROUPING_ID is not
standard (though supported in Oracle and SQL Server) and supports one or
more arguments.
The SQL standard has changed to allow GROUPING to have multiple
arguments. It is now equivalent to GROUPING_ID, so we made
GROUPING_ID a synonym for GROUPING.
public static final SqlInternalOperator EXTEND
EXTEND operator.public static final SqlBinaryOperator CONCAT
||'.public static final SqlBinaryOperator DIVIDE
/'.public static final SqlBinaryOperator PERCENT_REMAINDER
%',
an alternative to MOD allowed if under certain conformance levels.public static final SqlRandIntegerFunction RAND_INTEGER
RAND_INTEGER([seed, ] bound) function, which yields a random
integer, optionally with seed.public static final SqlRandFunction RAND
RAND([seed]) function, which yields a random double,
optionally with seed.public static final SqlBinaryOperator DIVIDE_INTEGER
/INT'. This
is only used to adjust scale for numerics. We distinguish it from
user-requested division since some personalities want a floating-point
computation, whereas for the internal scaling use of division, we always
want integer division.public static final SqlOperator DOT
.', used for referencing fields of records.public static final SqlBinaryOperator EQUALS
='.public static final SqlBinaryOperator GREATER_THAN
>'.public static final SqlBinaryOperator IS_DISTINCT_FROM
IS DISTINCT FROM operator.public static final SqlBinaryOperator IS_NOT_DISTINCT_FROM
IS NOT DISTINCT FROM operator. Is equivalent to NOT(x
IS DISTINCT FROM y)public static final SqlBinaryOperator IS_DIFFERENT_FROM
$IS_DIFFERENT_FROM operator is the same as the
user-level IS_DISTINCT_FROM in all respects except that
the test for equality on character datatypes treats trailing spaces as
significant.public static final SqlBinaryOperator GREATER_THAN_OR_EQUAL
>='.public static final SqlBinaryOperator IN
IN operator tests for a value's membership in a sub-query or
a list of values.public static final SqlBinaryOperator NOT_IN
NOT IN operator tests for a value's membership in a sub-query
or a list of values.public static final SqlQuantifyOperator SOME_LT
< SOME operator (synonymous with
< ANY).public static final SqlQuantifyOperator SOME_LE
public static final SqlQuantifyOperator SOME_GT
public static final SqlQuantifyOperator SOME_GE
public static final SqlQuantifyOperator SOME_EQ
public static final SqlQuantifyOperator SOME_NE
public static final SqlQuantifyOperator ALL_LT
< ALL operator.public static final SqlQuantifyOperator ALL_LE
public static final SqlQuantifyOperator ALL_GT
public static final SqlQuantifyOperator ALL_GE
public static final SqlQuantifyOperator ALL_EQ
public static final SqlQuantifyOperator ALL_NE
public static final SqlBinaryOperator LESS_THAN
<'.public static final SqlBinaryOperator LESS_THAN_OR_EQUAL
<='.public static final SqlBinaryOperator MINUS
public static final SqlBinaryOperator MULTIPLY
*'.public static final SqlBinaryOperator NOT_EQUALS
<>'.public static final SqlBinaryOperator OR
OR operator.public static final SqlBinaryOperator PLUS
+'.public static final SqlSpecialOperator DATETIME_PLUS
DATETIME + INTERVAL'.public static final SqlBinaryOperator MEMBER_OF
MEMBER OF, which returns whether a element belongs to a
multiset.
For example, the following returns false:
'green' MEMBER OF MULTISET ['red','almost green','blue']
public static final SqlBinaryOperator SUBMULTISET_OF
For example, the following returns false:
MULTISET ['green'] SUBMULTISET OF
MULTISET['red', 'almost green', 'blue']
The following returns true, in part because multisets are
order-independent:
MULTISET ['blue', 'red'] SUBMULTISET OF
MULTISET ['red', 'almost green', 'blue']
public static final SqlPostfixOperator DESC
public static final SqlPostfixOperator NULLS_FIRST
public static final SqlPostfixOperator NULLS_LAST
public static final SqlPostfixOperator IS_NOT_NULL
public static final SqlPostfixOperator IS_NULL
public static final SqlPostfixOperator IS_NOT_TRUE
public static final SqlPostfixOperator IS_TRUE
public static final SqlPostfixOperator IS_NOT_FALSE
public static final SqlPostfixOperator IS_FALSE
public static final SqlPostfixOperator IS_NOT_UNKNOWN
public static final SqlPostfixOperator IS_UNKNOWN
public static final SqlPostfixOperator IS_A_SET
public static final SqlPrefixOperator EXISTS
public static final SqlPrefixOperator NOT
public static final SqlPrefixOperator UNARY_MINUS
public static final SqlPrefixOperator UNARY_PLUS
public static final SqlPrefixOperator EXPLICIT_TABLE
select * from (TABLE t) or TABLE
t. See also COLLECTION_TABLE.public static final SqlPrefixOperator FINAL
FINAL function to be used within MATCH_RECOGNIZE.public static final SqlPrefixOperator RUNNING
RUNNING function to be used within MATCH_RECOGNIZE.public static final SqlAggFunction SUM
SUM aggregate function.public static final SqlAggFunction COUNT
COUNT aggregate function.public static final SqlAggFunction APPROX_COUNT_DISTINCT
APPROX_COUNT_DISTINCT aggregate function.public static final SqlAggFunction MIN
MIN aggregate function.public static final SqlAggFunction MAX
MAX aggregate function.public static final SqlAggFunction LAST_VALUE
LAST_VALUE aggregate function.public static final SqlAggFunction FIRST_VALUE
FIRST_VALUE aggregate function.public static final SqlAggFunction LEAD
LEAD aggregate function.public static final SqlAggFunction LAG
LAG aggregate function.public static final SqlAggFunction NTILE
NTILE aggregate function.public static final SqlAggFunction SINGLE_VALUE
SINGLE_VALUE aggregate function.public static final SqlAggFunction AVG
AVG aggregate function.public static final SqlAggFunction STDDEV_POP
STDDEV_POP aggregate function.public static final SqlAggFunction REGR_SXX
REGR_SXX aggregate function.public static final SqlAggFunction REGR_SYY
REGR_SYY aggregate function.public static final SqlAggFunction COVAR_POP
COVAR_POP aggregate function.public static final SqlAggFunction COVAR_SAMP
COVAR_SAMP aggregate function.public static final SqlAggFunction STDDEV_SAMP
STDDEV_SAMP aggregate function.public static final SqlAggFunction STDDEV
STDDEV aggregate function.public static final SqlAggFunction VAR_POP
VAR_POP aggregate function.public static final SqlAggFunction VAR_SAMP
VAR_SAMP aggregate function.public static final SqlAggFunction VARIANCE
VARIANCE aggregate function.public static final SqlAggFunction HISTOGRAM_AGG
HISTOGRAM aggregate function support. Used by window
aggregate versions of MIN/MAXpublic static final SqlFunction HISTOGRAM_MIN
HISTOGRAM_MIN window aggregate function.public static final SqlFunction HISTOGRAM_MAX
HISTOGRAM_MAX window aggregate function.public static final SqlFunction HISTOGRAM_FIRST_VALUE
HISTOGRAM_FIRST_VALUE window aggregate function.public static final SqlFunction HISTOGRAM_LAST_VALUE
HISTOGRAM_LAST_VALUE window aggregate function.public static final SqlAggFunction SUM0
SUM0 aggregate function.public static final SqlRankFunction CUME_DIST
CUME_DIST window function.public static final SqlRankFunction DENSE_RANK
DENSE_RANK window function.public static final SqlRankFunction PERCENT_RANK
PERCENT_RANK window function.public static final SqlRankFunction RANK
RANK window function.public static final SqlRankFunction ROW_NUMBER
ROW_NUMBER window function.public static final SqlRowOperator ROW
public static final SqlDatetimeSubtractionOperator MINUS_DATE
"(" <datetime> "-" <datetime> ")"
<interval qualifier>
This operator is special since it needs to hold the additional interval qualifier specification.
public static final SqlMultisetValueConstructor MULTISET_VALUE
MULTISET[1,2,3]".public static final SqlMultisetQueryConstructor MULTISET_QUERY
SELECT dname, MULTISET(SELECT
FROM emp WHERE deptno = dept.deptno) FROM dept".public static final SqlMultisetQueryConstructor ARRAY_QUERY
SELECT dname, ARRAY(SELECT
FROM emp WHERE deptno = dept.deptno) FROM dept".public static final SqlMultisetQueryConstructor MAP_QUERY
MAP(SELECT empno, deptno
FROM emp)".public static final SqlCursorConstructor CURSOR
SELECT * FROM
TABLE(DEDUP(CURSOR(SELECT * FROM EMPS), 'name'))".public static final SqlColumnListConstructor COLUMN_LIST
SELECT * FROM
TABLE(DEDUP(CURSOR(SELECT * FROM EMPS), ROW(name, empno)))".public static final SqlUnnestOperator UNNEST
UNNEST operator.public static final SqlUnnestOperator UNNEST_WITH_ORDINALITY
UNNEST WITH ORDINALITY operator.public static final SqlSpecialOperator LATERAL
LATERAL operator.public static final SqlSpecialOperator COLLECTION_TABLE
SELECT * FROM
TABLE(ramp(5))".
This operator has function syntax (with one argument), whereas
EXPLICIT_TABLE is a prefix operator.
public static final SqlOverlapsOperator OVERLAPS
public static final SqlOverlapsOperator CONTAINS
public static final SqlOverlapsOperator PRECEDES
public static final SqlOverlapsOperator IMMEDIATELY_PRECEDES
public static final SqlOverlapsOperator SUCCEEDS
public static final SqlOverlapsOperator IMMEDIATELY_SUCCEEDS
public static final SqlOverlapsOperator PERIOD_EQUALS
public static final SqlSpecialOperator VALUES
public static final SqlLiteralChainOperator LITERAL_CHAIN
public static final SqlThrowOperator THROW
public static final SqlBetweenOperator BETWEEN
public static final SqlBetweenOperator SYMMETRIC_BETWEEN
public static final SqlBetweenOperator NOT_BETWEEN
public static final SqlBetweenOperator SYMMETRIC_NOT_BETWEEN
public static final SqlSpecialOperator NOT_LIKE
public static final SqlSpecialOperator LIKE
public static final SqlSpecialOperator NOT_SIMILAR_TO
public static final SqlSpecialOperator SIMILAR_TO
public static final SqlSpecialOperator ESCAPE
public static final SqlCaseOperator CASE
public static final SqlOperator PROCEDURE_CALL
public static final SqlOperator NEW
public static final SqlBinaryOperator OVER
OVER operator, which applies an aggregate functions to a
window.
Operands are as follows:
SqlCall)SqlLiteral) or window
in-line specification (@link SqlWindowOperator})public static final SqlSpecialOperator REINTERPRET
REINTERPRET operator is internal to the planner. When the
physical storage of two types is the same, this operator may be used to
reinterpret values of one type as the other. This operator is similar to
a cast, except that it does not alter the data value. Like a regular cast
it accepts one operand and stores the target type as the return type. It
performs an overflow check if it has any second operand, whether
true or not.public static final SqlFunction SUBSTRING
SUBSTRING(string FROM start [FOR
length]).
If the length parameter is a constant, the length of the result is the minimum of the length of the input and that length. Otherwise it is the length of the input.
public static final SqlFunction REPLACE
REPLACE(string, search, replace) function. Not standard SQL,
but in Oracle and Postgres.public static final SqlFunction CONVERT
public static final SqlFunction TRANSLATE
TRANSLATE(char_value USING translation_name) function
alters the character set of a string value from one base character set to another.
It is defined in the SQL standard. See also non-standard
OracleSqlOperatorTable.TRANSLATE3.
public static final SqlFunction OVERLAY
public static final SqlFunction TRIM
public static final SqlFunction POSITION
public static final SqlFunction CHAR_LENGTH
public static final SqlFunction CHARACTER_LENGTH
public static final SqlFunction UPPER
public static final SqlFunction LOWER
public static final SqlFunction INITCAP
public static final SqlFunction POWER
public static final SqlFunction SQRT
public static final SqlFunction MOD
MOD.PERCENT_REMAINDERpublic static final SqlFunction LN
public static final SqlFunction LOG10
public static final SqlFunction ABS
public static final SqlFunction ACOS
public static final SqlFunction ASIN
public static final SqlFunction ATAN
public static final SqlFunction ATAN2
public static final SqlFunction COS
public static final SqlFunction COT
public static final SqlFunction DEGREES
public static final SqlFunction EXP
public static final SqlFunction RADIANS
public static final SqlFunction ROUND
public static final SqlFunction SIGN
public static final SqlFunction SIN
public static final SqlFunction TAN
public static final SqlFunction TRUNCATE
public static final SqlFunction PI
public static final SqlFunction FIRST
FIRST function to be used within MATCH_RECOGNIZE.public static final SqlFunction LAST
LAST function to be used within MATCH_RECOGNIZE.public static final SqlFunction PREV
PREV function to be used within MATCH_RECOGNIZE.public static final SqlFunction NEXT
NEXT function to be used within MATCH_RECOGNIZE.public static final SqlFunction CLASSIFIER
CLASSIFIER function to be used within MATCH_RECOGNIZE.public static final SqlFunction MATCH_NUMBER
MATCH_NUMBER function to be used within MATCH_RECOGNIZE.public static final SqlFunction NULLIF
public static final SqlFunction COALESCE
public static final SqlFunction FLOOR
FLOOR function.public static final SqlFunction CEIL
CEIL function.public static final SqlFunction USER
USER function.public static final SqlFunction CURRENT_USER
CURRENT_USER function.public static final SqlFunction SESSION_USER
SESSION_USER function.public static final SqlFunction SYSTEM_USER
SYSTEM_USER function.public static final SqlFunction CURRENT_PATH
CURRENT_PATH function.public static final SqlFunction CURRENT_ROLE
CURRENT_ROLE function.public static final SqlFunction CURRENT_CATALOG
CURRENT_CATALOG function.public static final SqlFunction CURRENT_SCHEMA
CURRENT_SCHEMA function.public static final SqlFunction LOCALTIME
LOCALTIME [(precision)] function.public static final SqlFunction LOCALTIMESTAMP
LOCALTIMESTAMP [(precision)] function.public static final SqlFunction CURRENT_TIME
CURRENT_TIME [(precision)] function.public static final SqlFunction CURRENT_TIMESTAMP
CURRENT_TIMESTAMP [(precision)] function.public static final SqlFunction CURRENT_DATE
CURRENT_DATE function.public static final SqlFunction TIMESTAMP_ADD
TIMESTAMPADD function.public static final SqlFunction TIMESTAMP_DIFF
TIMESTAMPDIFF function.public static final SqlFunction IN_FENNEL
IN_FENNEL operator forces the argument to be
evaluated in Fennel. Otherwise acts as identity function.public static final SqlFunction CAST
CAST operator.
The SQL syntax is
CAST(expression AS type)
When the CAST operator is applies as a SqlCall, it has two
arguments: the expression and the type. The type must not include a
constraint, so CAST(x AS INTEGER NOT NULL), for instance, is
invalid.
When the CAST operator is applied as a RexCall, the
target type is simply stored as the return type, not an explicit operand.
For example, the expression CAST(1 + 2 AS DOUBLE) will
become a call to CAST with the expression 1 + 2
as its only operand.
The RexCall form can also have a type which contains a
NOT NULL constraint. When this expression is implemented, if
the value is NULL, an exception will be thrown.
public static final SqlFunction EXTRACT
EXTRACT operator. Extracts a specified field value
from a DATETIME or an INTERVAL. E.g.EXTRACT(HOUR FROM INTERVAL '364 23:59:59') returns
23public static final SqlDatePartFunction YEAR
YEAR operator. Returns the Year
from a DATETIME E.g.YEAR(date '2008-9-23') returns
2008public static final SqlDatePartFunction QUARTER
QUARTER operator. Returns the Quarter
from a DATETIME E.g.QUARTER(date '2008-9-23') returns
3public static final SqlDatePartFunction MONTH
MONTH operator. Returns the Month
from a DATETIME E.g.MONTH(date '2008-9-23') returns
9public static final SqlDatePartFunction WEEK
WEEK operator. Returns the Week
from a DATETIME E.g.WEEK(date '2008-9-23') returns
39public static final SqlDatePartFunction DAYOFYEAR
DAYOFYEAR operator. Returns the DOY
from a DATETIME E.g.DAYOFYEAR(date '2008-9-23') returns
267public static final SqlDatePartFunction DAYOFMONTH
DAYOFMONTH operator. Returns the Day
from a DATETIME E.g.DAYOFMONTH(date '2008-9-23') returns
23public static final SqlDatePartFunction DAYOFWEEK
DAYOFWEEK operator. Returns the DOW
from a DATETIME E.g.DAYOFWEEK(date '2008-9-23') returns
2public static final SqlDatePartFunction HOUR
HOUR operator. Returns the Hour
from a DATETIME E.g.HOUR(timestamp '2008-9-23 01:23:45') returns
1public static final SqlDatePartFunction MINUTE
MINUTE operator. Returns the Minute
from a DATETIME E.g.MINUTE(timestamp '2008-9-23 01:23:45') returns
23public static final SqlDatePartFunction SECOND
SECOND operator. Returns the Second
from a DATETIME E.g.SECOND(timestamp '2008-9-23 01:23:45') returns
45public static final SqlFunction ELEMENT
public static final SqlOperator ITEM
[ ... ], used to access a given element of an
array or map. For example, myArray[3] or "myMap['foo']".
The SQL standard calls the ARRAY variant a <array element reference>. Index is 1-based. The standard says to raise "data exception - array element error" but we currently return null.
MAP is not standard SQL.
public static final SqlArrayValueConstructor ARRAY_VALUE_CONSTRUCTOR
ARRAY[1, 2, 3]".public static final SqlMapValueConstructor MAP_VALUE_CONSTRUCTOR
MAP['washington', 1, 'obama', 44]".public static final SqlInternalOperator SLICE
It is introduced when multisets of scalar types are created, in order
to keep types consistent. For example, MULTISET [5] has type
INTEGER MULTISET but is translated to an expression of type
RECORD(INTEGER EXPR$0) MULTISET because in our internal
representation of multisets, every element must be a record. Applying the
"$SLICE" operator to this result converts the type back to an
INTEGER MULTISET multiset value.
$SLICE is often translated away when the multiset type is
converted back to scalar values.
public static final SqlInternalOperator ELEMENT_SLICE
It is introduced when multisets of scalar types are created, in order
to keep types consistent. For example, ELEMENT(MULTISET [5])
is translated to $ELEMENT_SLICE(MULTISET (VALUES ROW (5
EXPR$0)) It is translated away when the multiset type is converted
back to scalar values.
NOTE: jhyde, 2006/1/9: Usages of this operator are commented out, but I'm not deleting the operator, because some multiset tests are disabled, and we may need this operator to get them working!
public static final SqlInternalOperator SCALAR_QUERY
public static final SqlFunction CARDINALITY
public static final SqlAggFunction COLLECT
public static final SqlFunction FUSION
public static final SqlOperator NEXT_VALUE
NEXT VALUE FOR sequencepublic static final SqlOperator CURRENT_VALUE
CURRENT VALUE FOR
sequencepublic static final SqlSpecialOperator TABLESAMPLE
TABLESAMPLE operator.
Examples:
<query> TABLESAMPLE SUBSTITUTE('sampleName')
(non-standard)
<query> TABLESAMPLE BERNOULLI(<percent>)
[REPEATABLE(<seed>)] (standard, but not implemented for FTRS
yet)
<query> TABLESAMPLE SYSTEM(<percent>)
[REPEATABLE(<seed>)] (standard, but not implemented for FTRS
yet)
Operand #0 is a query or table; Operand #1 is a SqlSampleSpec
wrapped in a SqlLiteral.
public static final SqlGroupedWindowFunction TUMBLE
TUMBLE group function.public static final SqlGroupedWindowFunction TUMBLE_START
TUMBLE_START auxiliary function of
the TUMBLE group function.public static final SqlGroupedWindowFunction TUMBLE_END
TUMBLE_END auxiliary function of
the TUMBLE group function.public static final SqlGroupedWindowFunction HOP
HOP group function.public static final SqlGroupedWindowFunction HOP_START
HOP_START auxiliary function of
the HOP group function.public static final SqlGroupedWindowFunction HOP_END
HOP_END auxiliary function of
the HOP group function.public static final SqlGroupedWindowFunction SESSION
SESSION group function.public static final SqlGroupedWindowFunction SESSION_START
SESSION_START auxiliary function of
the SESSION group function.public static final SqlGroupedWindowFunction SESSION_END
SESSION_END auxiliary function of
the SESSION group function.public static final SqlBinaryOperator PATTERN_ALTER
| operator to create alternate patterns
within MATCH_RECOGNIZE.
If p1 and p2 are patterns then p1 | p2 is a
pattern that matches p1 or p2.
public static final SqlBinaryOperator PATTERN_CONCAT
MATCH_RECOGNIZE.
If p1 and p2 are patterns then p1 p2 is a
pattern that matches p1 followed by p2.
public static final SqlSpecialOperator PATTERN_QUANTIFIER
MATCH_RECOGNIZE.
If p is a pattern then p{3, 5} is a
pattern that matches between 3 and 5 occurrences of p.
public static final SqlSpecialOperator PATTERN_PERMUTE
PERMUTE operator to combine patterns within
MATCH_RECOGNIZE.
If p1 and p2 are patterns then PERMUTE (p1, p2)
is a pattern that matches all permutations of p1 and
p2.
public static final SqlSpecialOperator PATTERN_EXCLUDE
EXCLUDE operator within MATCH_RECOGNIZE.
If p is a pattern then {- p -} } is a
pattern that excludes p from the output.
public static SqlStdOperatorTable instance()
public static SqlGroupedWindowFunction auxiliaryToGroup(SqlKind kind)
public static SqlCall convertAuxiliaryToGroupCall(SqlCall call)
For example, converts TUMBLE_START(rowtime, INTERVAL '1' HOUR))
to TUMBLE(rowtime, INTERVAL '1' HOUR)).
public static List<Pair<SqlNode,AuxiliaryConverter>> convertGroupToAuxiliaryCalls(SqlCall call)
For example, converts TUMBLE_START(rowtime, INTERVAL '1' HOUR))
to TUMBLE(rowtime, INTERVAL '1' HOUR)).
private static SqlCall copy(SqlCall call, SqlOperator operator)
public static SqlQuantifyOperator some(SqlKind comparisonKind)
SOME comparisonKind.public static SqlQuantifyOperator all(SqlKind comparisonKind)
ALL comparisonKind.Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.