public class SqlStdOperatorTable extends ReflectiveSqlOperatorTable
SqlOperatorTable containing
the standard operators and functions.| Modifier and Type | Field and Description |
|---|---|
static SqlFunction |
ABS |
static SqlBinaryOperator |
AND
Logical
AND operator. |
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 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 |
COALESCE
The COALESCE builtin function.
|
static SqlFunction |
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 SqlFunction |
CONVERT |
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 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 SqlBinaryOperator |
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 to add columns to a table's schema, as in
{@code SELECT ... |
static SqlFunction |
EXTRACT
The SQL
EXTRACT operator. |
static SqlSpecialOperator |
EXTRACT_DATE
Internal operator that extracts time periods (year, month, date) from a
date in internal format (number of days since epoch).
|
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 org.apache.calcite.sql.fun.SqlGroupIdFunction |
GROUP_ID
GROUP_ID function. |
static org.apache.calcite.sql.fun.SqlGroupingFunction |
GROUPING
GROUPING function. |
static org.apache.calcite.sql.fun.SqlGroupingIdFunction |
GROUPING_ID
GROUPING_ID function. |
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 SqlBinaryOperator |
IN
IN operator tests for a value's membership in a subquery 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 |
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 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 SqlAggFunction |
MAX
MAX aggregate function. |
static SqlBinaryOperator |
MEMBER_OF
Multiset MEMBER OF.
|
static SqlAggFunction |
MIN
MIN aggregate function. |
static SqlBinaryOperator |
MINUS
Infix arithmetic minus operator, '
-'. |
static SqlOperator |
MINUS_DATE
A special operator for the subtraction of two DATETIMEs.
|
static SqlFunction |
MOD |
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 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 subquery
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 SqlRankFunction |
PERCENT_RANK
PERCENT_RANK Window function. |
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 SqlOperator |
PROCEDURE_CALL |
static SqlQuarterFunction |
QUARTER
The SQL
QUARTER operator. |
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 SqlInternalOperator |
ROLLUP
ROLLUP operator, occurs within GROUP BY clause
or nested within a GROUPING SETS. |
static SqlRowOperator |
ROW |
static SqlRankFunction |
ROW_NUMBER
ROW_NUMBER Window function. |
static SqlInternalOperator |
SCALAR_QUERY
The internal "$SCALAR_QUERY" operator returns a scalar value from a
record type.
|
static SqlFunction |
SESSION_USER
The
SESSION_USER function. |
static SqlSpecialOperator |
SIMILAR_TO |
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 SqlFunction |
SQRT |
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 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 SqlThrowOperator |
THROW |
static SqlFunction |
TRANSLATE |
static SqlFunction |
TRIM
The "TRIM" 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 SqlSpecialOperator |
UNNEST
The
UNNEST 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. |
IS_NAME| Constructor and Description |
|---|
SqlStdOperatorTable() |
| Modifier and Type | Method and Description |
|---|---|
static SqlStdOperatorTable |
instance()
Returns the standard operator table, creating it if necessary.
|
getOperatorList, init, lookupOperatorOverloads, register, registerpublic 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 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 org.apache.calcite.sql.fun.SqlGroupingFunction GROUPING
GROUPING 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 org.apache.calcite.sql.fun.SqlGroupIdFunction GROUP_ID
GROUP_ID function.public static final org.apache.calcite.sql.fun.SqlGroupingIdFunction GROUPING_ID
GROUPING_ID function.public static final SqlInternalOperator EXTEND
EXTEND operator to add columns to a table's schema, as in
SELECT ... FROM emp EXTEND (horoscope VARCHAR(100)).public static final SqlBinaryOperator CONCAT
||'.public static final SqlBinaryOperator DIVIDE
/'.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 SqlBinaryOperator 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 subquery or
a list of values.public static final SqlBinaryOperator NOT_IN
NOT IN operator tests for a value's membership in a subquery
or a list of values.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
'green' MEMBER OF MULTISET['red','almost green','blue']
returns false.public static final SqlBinaryOperator SUBMULTISET_OF
MULTISET['green'] SUBMULTISET OF MULTISET['red','almost
green','blue'] returns false.
But MULTISET['blue', 'red'] SUBMULTISET OF
MULTISET['red','almost green','blue'] returns true
(NB multisets is order independant)
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 SqlAggFunction SUM
SUM aggregate function.public static final SqlAggFunction COUNT
COUNT 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 VAR_POP
VAR_POP aggregate function.public static final SqlAggFunction VAR_SAMP
VAR_SAMP 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 SqlOperator 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 SqlSpecialOperator UNNEST
UNNEST 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 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 SqlSpecialOperator EXTRACT_DATE
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 CONVERT
public static final SqlFunction TRANSLATE
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
public static final SqlFunction LN
public static final SqlFunction LOG10
public static final SqlFunction ABS
public static final SqlFunction EXP
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 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 SqlQuarterFunction QUARTER
QUARTER operator. Returns the Quarter
from a DATETIME E.g.QUARTER(date '2008-9-23') returns
3public 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 SqlFunction 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 SqlStdOperatorTable instance()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.