public abstract class SqlLibraryOperators extends Object
They are read by SqlLibraryOperatorTableFactory into instances
of SqlOperatorTable that contain functions and operators for
particular libraries.
| Modifier and Type | Field and Description |
|---|---|
static SqlAggFunction |
ARRAY_AGG
The "ARRAY_AGG(value [ ORDER BY ...])" aggregate function,
in BigQuery and PostgreSQL, gathers values into arrays.
|
static SqlFunction |
ARRAY_CONCAT
The "ARRAY_CONCAT(array [, array]*)" function.
|
static SqlAggFunction |
ARRAY_CONCAT_AGG
The "ARRAY_CONCAT_AGG(value [ ORDER BY ...])" aggregate function,
in BigQuery and PostgreSQL, concatenates array values into arrays.
|
static SqlFunction |
ARRAY_LENGTH
The "ARRAY_LENGTH(array)" function.
|
static SqlFunction |
ARRAY_REVERSE
The "ARRAY_REVERSE(array)" function.
|
static SqlAggFunction |
BOOL_AND
The "BOOL_AND(condition)" aggregate function, PostgreSQL and Redshift's
equivalent to
SqlStdOperatorTable.EVERY. |
static SqlAggFunction |
BOOL_OR
The "BOOL_OR(condition)" aggregate function, PostgreSQL and Redshift's
equivalent to
SqlStdOperatorTable.SOME. |
static SqlFunction |
CHAR
The "CHAR(n)" function; returns the character whose ASCII code is
n % 256, or null if n < 0. |
static SqlFunction |
CHR
The "CHR(n)" function; returns the character whose UTF-8 code is
n. |
static SqlFunction |
COMPRESS |
static SqlFunction |
CONCAT_FUNCTION
The "CONCAT(arg, ...)" function that concatenates strings.
|
static SqlFunction |
CONCAT2
The "CONCAT(arg0, arg1)" function that concatenates strings.
|
static SqlFunction |
CONVERT_TIMEZONE
The "CONVERT_TIMEZONE(tz1, tz2, datetime)" function;
converts the timezone of
datetime from tz1 to tz2. |
static SqlFunction |
COSH |
static SqlAggFunction |
COUNTIF
The "COUNTIF(condition) [OVER (...)]" function, in BigQuery,
returns the count of TRUE values for expression.
|
static SqlFunction |
CURRENT_DATETIME
The "CURRENT_DATETIME([timezone])" function.
|
static SqlFunction |
DATE
The "DATE(string)" function, equivalent to "CAST(string AS DATE).
|
static SqlFunction |
DATE_FROM_UNIX_DATE
The "DATE_FROM_UNIX_DATE(integer)" function; returns a DATE value
a given number of seconds after 1970-01-01.
|
static SqlFunction |
DAYNAME
The "DAYNAME(datetime)" function; returns the name of the day of the week,
in the current locale, of a TIMESTAMP or DATE argument.
|
static SqlFunction |
DECODE
The "DECODE(v, v1, result1, [v2, result2, ...], resultN)" function.
|
static SqlFunction |
DIFFERENCE |
static SqlFunction |
EXISTS_NODE |
static SqlFunction |
EXTRACT_VALUE |
static SqlFunction |
EXTRACT_XML |
static SqlFunction |
FROM_BASE64 |
static SqlFunction |
GREATEST
The "GREATEST(value, value)" function.
|
static SqlAggFunction |
GROUP_CONCAT
The "GROUP_CONCAT([DISTINCT] expr [, ...] [ORDER BY ...] [SEPARATOR sep])"
aggregate function, MySQL's equivalent of
SqlStdOperatorTable.LISTAGG. |
static SqlFunction |
IF
The "IF(condition, thenValue, elseValue)" function.
|
static SqlSpecialOperator |
ILIKE
The case-insensitive variant of the LIKE operator.
|
static SqlOperator |
INFIX_CAST
Infix "::" cast operator used by PostgreSQL, for example
'100'::INTEGER. |
static SqlFunction |
JSON_DEPTH |
static SqlFunction |
JSON_KEYS |
static SqlFunction |
JSON_LENGTH |
static SqlFunction |
JSON_PRETTY |
static SqlFunction |
JSON_REMOVE |
static SqlFunction |
JSON_STORAGE_SIZE |
static SqlFunction |
JSON_TYPE |
static SqlFunction |
LEAST
The "LEAST(value, value)" function.
|
static SqlFunction |
LEFT |
static SqlAggFunction |
LOGICAL_AND
The "LOGICAL_AND(condition)" aggregate function, BigQuery's
equivalent to
SqlStdOperatorTable.EVERY. |
static SqlAggFunction |
LOGICAL_OR
The "LOGICAL_OR(condition)" aggregate function, BigQuery's
equivalent to
SqlStdOperatorTable.SOME. |
static SqlFunction |
LTRIM
The "LTRIM(string)" function.
|
static SqlFunction |
MD5 |
static SqlFunction |
MONTHNAME
The "MONTHNAME(datetime)" function; returns the name of the month,
in the current locale, of a TIMESTAMP or DATE argument.
|
static SqlSpecialOperator |
NOT_ILIKE
The case-insensitive variant of the NOT LIKE operator.
|
static SqlSpecialOperator |
NOT_RLIKE
The regex variant of the NOT LIKE operator.
|
static SqlOperator |
NULL_SAFE_EQUAL
NULL-safe "<=>" equal operator used by MySQL, for example
1<=>NULL. |
static SqlFunction |
NVL
The "NVL(value, value)" function.
|
static SqlFunction |
REGEXP_REPLACE |
static SqlFunction |
REPEAT |
static SqlFunction |
REVERSE |
static SqlFunction |
RIGHT |
static SqlSpecialOperator |
RLIKE
The regex variant of the LIKE operator.
|
static SqlFunction |
RTRIM
The "RTRIM(string)" function.
|
static SqlFunction |
SHA1 |
static SqlFunction |
SINH |
static SqlFunction |
SOUNDEX |
static SqlFunction |
SPACE |
static SqlFunction |
STRCMP |
static SqlAggFunction |
STRING_AGG
The "STRING_AGG(value [, separator ] [ ORDER BY ...])" aggregate function,
BigQuery and PostgreSQL's equivalent of
SqlStdOperatorTable.LISTAGG. |
static SqlFunction |
SUBSTR_BIG_QUERY
BigQuery's "SUBSTR(string, position [, substringLength ])" function.
|
static SqlFunction |
SUBSTR_MYSQL
MySQL's "SUBSTR(string, position [, substringLength ])" function.
|
static SqlFunction |
SUBSTR_ORACLE
Oracle's "SUBSTR(string, position [, substringLength ])" function.
|
static SqlFunction |
SUBSTR_POSTGRESQL
PostgreSQL's "SUBSTR(string, position [, substringLength ])" function.
|
static SqlFunction |
TANH |
static SqlFunction |
TIMESTAMP_MICROS
The "TIMESTAMP_MICROS(bigint)" function; returns a TIMESTAMP value
a given number of micro-seconds after 1970-01-01 00:00:00.
|
static SqlFunction |
TIMESTAMP_MILLIS
The "TIMESTAMP_MILLIS(bigint)" function; returns a TIMESTAMP value
a given number of milliseconds after 1970-01-01 00:00:00.
|
static SqlFunction |
TIMESTAMP_SECONDS
The "TIMESTAMP_SECONDS(bigint)" function; returns a TIMESTAMP value
a given number of seconds after 1970-01-01 00:00:00.
|
static SqlFunction |
TO_BASE64 |
static SqlFunction |
TO_DATE
The "TO_DATE(string1, string2)" function; casts string1
to a DATE using the format specified in string2.
|
static SqlFunction |
TO_TIMESTAMP
The "TO_TIMESTAMP(string1, string2)" function; casts string1
to a TIMESTAMP using the format specified in string2.
|
static SqlFunction |
TRANSLATE3
The
TRANSLATE(string_expr, search_chars,
replacement_chars) function returns string_expr with
all occurrences of each character in search_chars replaced by its
corresponding character in replacement_chars. |
static SqlFunction |
UNIX_DATE
The "UNIX_DATE(date)" function; returns the number of days since
1970-01-01.
|
static SqlFunction |
UNIX_MICROS
The "UNIX_MICROS(bigint)" function; returns the number of microseconds
since 1970-01-01 00:00:00.
|
static SqlFunction |
UNIX_MILLIS
The "UNIX_MILLIS(bigint)" function; returns the number of milliseconds
since 1970-01-01 00:00:00.
|
static SqlFunction |
UNIX_SECONDS
The "UNIX_SECONDS(bigint)" function; returns the number of seconds
since 1970-01-01 00:00:00.
|
static SqlFunction |
XML_TRANSFORM |
public static final SqlFunction CONVERT_TIMEZONE
datetime from tz1 to tz2.
This function is only on Redshift, but we list it in PostgreSQL
because Redshift does not have its own library.public static final SqlFunction DECODE
public static final SqlFunction IF
public static final SqlFunction NVL
public static final SqlFunction LTRIM
public static final SqlFunction RTRIM
public static final SqlFunction SUBSTR_BIG_QUERY
public static final SqlFunction SUBSTR_MYSQL
public static final SqlFunction SUBSTR_ORACLE
It has different semantics to standard SQL's
SqlStdOperatorTable.SUBSTRING function:
substringLength ≤ 0, result is the empty string
(Oracle would return null, because it treats the empty string as null,
but Calcite does not have these semantics);
position = 0, treat position as 1;
position < 0, treat position as
"length(string) + position + 1".
public static final SqlFunction SUBSTR_POSTGRESQL
public static final SqlFunction GREATEST
public static final SqlFunction LEAST
public static final SqlFunction TRANSLATE3
TRANSLATE(string_expr, search_chars,
replacement_chars) function returns string_expr with
all occurrences of each character in search_chars replaced by its
corresponding character in replacement_chars.
It is not defined in the SQL standard, but occurs in Oracle and PostgreSQL.
public static final SqlFunction JSON_TYPE
public static final SqlFunction JSON_DEPTH
public static final SqlFunction JSON_LENGTH
public static final SqlFunction JSON_KEYS
public static final SqlFunction JSON_PRETTY
public static final SqlFunction JSON_REMOVE
public static final SqlFunction JSON_STORAGE_SIZE
public static final SqlFunction REGEXP_REPLACE
public static final SqlFunction COMPRESS
public static final SqlFunction EXTRACT_VALUE
public static final SqlFunction XML_TRANSFORM
public static final SqlFunction EXTRACT_XML
public static final SqlFunction EXISTS_NODE
public static final SqlAggFunction BOOL_AND
SqlStdOperatorTable.EVERY.public static final SqlAggFunction BOOL_OR
SqlStdOperatorTable.SOME.public static final SqlAggFunction LOGICAL_AND
SqlStdOperatorTable.EVERY.public static final SqlAggFunction LOGICAL_OR
SqlStdOperatorTable.SOME.public static final SqlAggFunction COUNTIF
COUNTIF(b) is equivalent to
COUNT(*) FILTER (WHERE b).
public static final SqlAggFunction ARRAY_AGG
public static final SqlAggFunction ARRAY_CONCAT_AGG
public static final SqlAggFunction STRING_AGG
SqlStdOperatorTable.LISTAGG.
STRING_AGG(v, sep ORDER BY x, y) is implemented by
rewriting to LISTAGG(v, sep) WITHIN GROUP (ORDER BY x, y).
public static final SqlAggFunction GROUP_CONCAT
SqlStdOperatorTable.LISTAGG.
GROUP_CONCAT(v ORDER BY x, y SEPARATOR s) is implemented by
rewriting to LISTAGG(v, s) WITHIN GROUP (ORDER BY x, y).
public static final SqlFunction DATE
public static final SqlFunction CURRENT_DATETIME
public static final SqlFunction DATE_FROM_UNIX_DATE
public static final SqlFunction UNIX_DATE
public static final SqlFunction MONTHNAME
public static final SqlFunction DAYNAME
public static final SqlFunction LEFT
public static final SqlFunction REPEAT
public static final SqlFunction RIGHT
public static final SqlFunction SPACE
public static final SqlFunction STRCMP
public static final SqlFunction SOUNDEX
public static final SqlFunction DIFFERENCE
public static final SqlSpecialOperator ILIKE
public static final SqlSpecialOperator NOT_ILIKE
public static final SqlSpecialOperator RLIKE
public static final SqlSpecialOperator NOT_RLIKE
public static final SqlFunction CONCAT_FUNCTION
public static final SqlFunction CONCAT2
It is assigned SqlKind.CONCAT2 to make it not equal to
CONCAT_FUNCTION.
public static final SqlFunction ARRAY_LENGTH
public static final SqlFunction ARRAY_REVERSE
public static final SqlFunction ARRAY_CONCAT
public static final SqlFunction REVERSE
public static final SqlFunction FROM_BASE64
public static final SqlFunction TO_BASE64
public static final SqlFunction TO_DATE
public static final SqlFunction TO_TIMESTAMP
public static final SqlFunction TIMESTAMP_SECONDS
public static final SqlFunction TIMESTAMP_MILLIS
public static final SqlFunction TIMESTAMP_MICROS
public static final SqlFunction UNIX_SECONDS
public static final SqlFunction UNIX_MILLIS
public static final SqlFunction UNIX_MICROS
public static final SqlFunction CHAR
n % 256, or null if n < 0.public static final SqlFunction CHR
n.public static final SqlFunction TANH
public static final SqlFunction COSH
public static final SqlFunction SINH
public static final SqlFunction MD5
public static final SqlFunction SHA1
public static final SqlOperator INFIX_CAST
'100'::INTEGER.public static final SqlOperator NULL_SAFE_EQUAL
1<=>NULL.Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.