Class SqlLibraryOperators
They are read by SqlLibraryOperatorTableFactory into instances
of SqlOperatorTable that contain functions and operators for
particular libraries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SqlFunctionTheACOSD(numeric)function; returns the inverse cosine ofvaluein degrees.static final SqlFunctionTheACOSH(numeric)function; returns the inverse hyperbolic cosine ofvalue.static final SqlFunctionThe "ADD_MONTHS(start_date, num_months)" function (SPARK) Returns the date that is num_months after start_date.static final SqlFunctionThe "AGGREGATE(m)" aggregate function; aggregates a measure column according to the measure's rollup strategy.static final SqlFunctionThe "ARRAY(exp, ...)" function (Spark); compare with the standard array value constructor, "ARRAY [exp, ...]".static final SqlAggFunctionThe "ARRAY_AGG(value [ ORDER BY ...])" aggregate function, in BigQuery and PostgreSQL, gathers values into arrays.static final SqlFunctionThe "ARRAY_APPEND(array, element)" function.static final SqlFunctionThe "ARRAY_COMPACT(array)" function.static final SqlFunctionThe "ARRAY_CONCAT(array [, array]*)" function.static final SqlAggFunctionThe "ARRAY_CONCAT_AGG(value [ ORDER BY ...])" aggregate function, in BigQuery and PostgreSQL, concatenates array values into arrays.static final SqlFunctionThe "ARRAY_CONTAINS(array, element)" function.static final SqlFunctionThe "ARRAY_DISTINCT(array)" function.static final SqlFunctionThe "ARRAY_EXCEPT(array1, array2)" function.static final SqlFunctionThe "ARRAY_INSERT(array, pos, val)" function (Spark).static final SqlFunctionThe "ARRAY_INTERSECT(array1, array2)" function.static final SqlFunctionThe "ARRAY_JOIN(array, delimiter [, nullText ])" function.static final SqlFunctionThe "ARRAY_LENGTH(array)" function.static final SqlFunctionThe "ARRAY_MAX(array)" function.static final SqlFunctionThe "ARRAY_MIN(array)" function.static final SqlFunctionThe "ARRAY_POSITION(array, element)" function.static final SqlFunctionThe "ARRAY_PREPEND(array, element)" function.static final SqlFunctionThe "ARRAY_REMOVE(array, element)" function.static final SqlFunctionThe "ARRAY_REPEAT(element, count)" function.static final SqlFunctionThe "ARRAY_REVERSE(array)" function.static final SqlFunctionThe "ARRAY_SIZE(array)" function.static final SqlFunctionThe "ARRAY_SLICE(array, start, length)" function.static final SqlFunctionThe "ARRAY_TO_STRING(array, delimiter [, nullText ])" function.static final SqlFunctionThe "ARRAY_UNION(array1, array2)" function.static final SqlFunctionThe "ARRAYS_OVERLAP(array1, array2)" function (Spark).static final SqlFunctionThe "ARRAYS_ZIP(array, ...)" function (Spark).static final SqlFunctionTheACOSD(numeric)function; returns the inverse sine ofvaluein degrees.static final SqlFunctionTheASINH(numeric)function; returns the inverse hyperbolic sine ofvalue.static final SqlFunctionTheACOSD(numeric)function; returns the inverse tangent ofvaluein degrees.static final SqlFunctionTheATANH(numeric)function; returns the inverse hyperbolic tangent ofvalue.static final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionAlias forSqlStdOperatorTable.BITCOUNT.static final SqlFunctionstatic final SqlBasicFunctionThe "BIT_GET(value, position)" function.static final SqlFunctionThe "BIT_LENGTH(string or binary)" function.static final SqlAggFunctionThe "BITAND_AGG(expression)" function.static final SqlAggFunctionThe "BITOR_AGG(expression)" function.static final SqlAggFunctionThe "BOOL_AND(condition)" aggregate function, PostgreSQL and Redshift's equivalent toSqlStdOperatorTable.EVERY.static final SqlAggFunctionThe "BOOL_OR(condition)" aggregate function, PostgreSQL and Redshift's equivalent toSqlStdOperatorTable.SOME.static final SqlAggFunctionThe "BOOLAND_AGG(condition)" aggregate function, Snowflake's equivalent toSqlStdOperatorTable.EVERY.static final SqlAggFunctionThe "BOOLOR_AGG(condition)" aggregate function, Snowflake's equivalent toSqlStdOperatorTable.SOME.static final SqlFunctionThe "CEIL(value)" function.static final SqlFunctionThe "CHAR(n)" function; returns the character whose ASCII code isn% 256, or null ifn< 0.static final SqlFunctionThe "CHR(n)" function; returns the character whose UTF-8 code isn.static final SqlFunctionThe "CODE_POINTS_TO_BYTES(integers)" function (BigQuery); Converts an array of extended ASCII code points to bytes.static final SqlFunctionThe "CODE_POINTS_TO_STRING(integers)" function (BigQuery); Converts an array of Unicode code points to string.static final SqlFunctionstatic final SqlFunctionThe "CONCAT(arg, ...)" function that concatenates strings.static final SqlFunctionThe "CONCAT(arg, ...)" function that concatenates strings, which never returns null.static final SqlFunctionThe "CONCAT_WS(separator, arg1, ...)" function (MySQL); concatenates strings with separator, and treats null arguments as empty strings.static final SqlFunctionThe "CONCAT_WS(separator, arg1, arg2, ...)" function in (MSSQL).static final SqlFunctionThe "CONCAT_WS(separator, arg1, ...)" function (Postgres).static final SqlFunctionThe "CONCAT_WS(separator[, str | array(str)]+)" function in (SPARK).static final SqlFunctionThe "CONCAT(arg0, arg1)" function that concatenates strings.static final SqlFunction"CONTAINS_SUBSTR(expression, string[, json_scope => json_scope_value ])" function; returns whether string exists as substring in expression, with optional json_scope argument.static final SqlFunctionstatic final SqlFunctionThe "CONVERT_TIMEZONE(tz1, tz2, datetime)" function; converts the timezone ofdatetimefromtz1totz2.static final SqlFunctionTheCOSD(numeric)function; returns the cosine ofvalue.static final SqlFunctionstatic final SqlFunctionThe "COTH(value)" function; returns the hyperbolic cotangent ofvalue.static final SqlAggFunctionThe "COUNTIF(condition) [OVER (...)]" function, in BigQuery, returns the count of TRUE values for expression.static final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionThe "COTH(value)" function; returns the hyperbolic cosecant ofvalue.static final SqlFunctionThe "CURRENT_DATETIME([timezone])" function.static final SqlFunctionThe "DATE" function.static final SqlFunctionTHE "DATE_ADD(date, interval)" function (BigQuery) adds the interval to the date.static final SqlFunctionThe "DATE_ADD(date, numDays)" function (Spark) Returns the date that is num_days after start_date.static final SqlFunctionTHE "DATE_DIFF(date, date2, timeUnit)" function (BigQuery) returns the number of timeUnit in (date - date2).static final SqlFunctionThe "DATE_FROM_UNIX_DATE(integer)" function; returns a DATE value a given number of seconds after 1970-01-01.static final SqlFunctionThe "DATE_PART(timeUnit, datetime)" function (Databricks, Postgres, Redshift, Snowflake).static final SqlFunctionThe "DATE_SUB(date, interval)" function (BigQuery); subtracts interval from the date, independent of any time zone.static final SqlFunctionThe "DATE_SUB(date, numDays)" function (Spark) Returns the date that is num_days before start_date.static final SqlFunctionThe "DATE_TRUNC(date, timeUnit)" function (BigQuery); truncates a DATE value to the beginning of a timeUnit.static final SqlFunctionThe "DATEADD(timeUnit, numeric, datetime)" function (Microsoft SQL Server, Redshift, Snowflake).static final SqlFunctionThe "DATEDIFF(timeUnit, datetime, datetime2)" function (Microsoft SQL Server, Redshift, Snowflake).static final SqlFunctionThe "DATEPART(timeUnit, datetime)" function (Microsoft SQL Server).static final SqlFunctionThe "DATETIME" function returns a CalciteTIMESTAMP(which BigQuery calls aDATETIME).static final SqlFunctionThe "DATETIME_ADD(timestamp, interval)" function (BigQuery).static final SqlFunctionThe "DATETIME_DIFF(timestamp, timestamp2, timeUnit)" function (BigQuery).static final SqlFunctionThe "DATETIME_SUB(timestamp, interval)" function (BigQuery).static final SqlFunctionThe "DATETIME_TRUNC(timestamp, timeUnit)" function (BigQuery); truncates a TIMESTAMP value to the beginning of a timeUnit.static final SqlFunctionThe "DAYNAME(datetime)" function; returns the name of the day of the week, in the current locale, of a TIMESTAMP or DATE argument.static final SqlFunctionThe "DECODE(v, v1, result1, [v2, result2, ...], resultN)" function.static final SqlFunctionstatic final SqlBasicFunctionThe "ENDS_WITH(value1, value2)" function (BigQuery).static final SqlFunctionThe "ENDSWITH(value1, value2)" function (Snowflake).static final SqlFunctionThe "EXISTS(array, lambda)" function (Spark); returns whether a predicate holds for one or more elements in the array.static final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionTheFACTORIAL(integer)function.static final SqlFunctionThe "FIND_IN_SET(matchStr, textStr)" function.static final SqlFunctionThe "FLOOR(value)" function.static final SqlFunctionThe "FORMAT_DATE(string, date)" function (BigQuery); Formats a date object according to the specified string.static final SqlFunctionThe "FORMAT_DATETIME(string, timestamp)" function (BigQuery); formats a timestamp object according to the specified string.static final SqlFunctionThe "FORMAT_NUMBER(value, decimalOrFormat)" function.static final SqlFunctionThe "FORMAT_TIME(string, time)" function (BigQuery); Formats a time object according to the specified string.static final SqlFunctionThe "FORMAT_TIMESTAMP(string, timestamp)" function (BigQuery); Formats a timestamp object according to the specified string.static final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionThe "FROM_HEX(varchar)" function; converts a hexadecimal-encodedvarcharinto bytes.static final SqlFunctionAlias forBIT_GET.static final SqlFunctionThe "GREATEST(value, value)" function.static final SqlFunctionThe "GREATEST(value, value)" function.static final SqlAggFunctionThe "GROUP_CONCAT([DISTINCT] expr [, ...] [ORDER BY ...] [SEPARATOR sep])" aggregate function, MySQL's equivalent ofSqlStdOperatorTable.LISTAGG.static final SqlFunctionThe "HEX(string)" function; convertsstringinto a hexadecimal varchar.static final SqlFunctionThe "IF(condition, thenValue, elseValue)" function.static final SqlFunctionThe "IFNULL(value, value)" function.static final SqlSpecialOperatorThe case-insensitive variant of the LIKE operator.static final SqlOperatorInfix "::" cast operator used by PostgreSQL, for example'100'::INTEGER.static final SqlFunctionThe "INSTR(string, substring [, position [, occurrence]])" function.static final SqlFunctionThe "IS_INF(value)" function.static final SqlFunctionThe "IS_NAN(value)" function.static final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionThe "LEAST(value, value)" function.static final SqlFunctionThe "LEAST(value, value)" function.static final SqlFunctionstatic final SqlFunctionThe "LEN(string)" function.static final SqlFunctionThe "LENGTH(string)" function.static final SqlFunctionThe "LEVENSHTEIN(string1, string2)" function.static final SqlFunctionThe "LOG(value [, value2])" function.static final SqlFunctionThe "LOG(numeric1 [, numeric2 ]) " function.static final SqlFunctionThe "LOG(numeric1 [, numeric2 ]) " function.static final SqlFunctionThe "LOG1p(numeric)" function.static final SqlFunctionThe "LOG2(numeric)" function.static final SqlAggFunctionThe "LOGICAL_AND(condition)" aggregate function, BigQuery's equivalent toSqlStdOperatorTable.EVERY.static final SqlAggFunctionThe "LOGICAL_OR(condition)" aggregate function, BigQuery's equivalent toSqlStdOperatorTable.SOME.static final SqlFunctionThe "LPAD(original_value, return_length[, pattern])" function.static final SqlFunctionThe "LTRIM(string)" function.static final SqlFunctionThe "MAP(key, value, ...)" function (Spark); compare with the standard map value constructor, "MAP[key, value, ...]".static final SqlFunctionThe "MAP_CONCAT(map [, map]*)" function.static final SqlFunctionThe "MAP_CONTAINS_KEY(map, key)" function.static final SqlFunctionThe "MAP_ENTRIES(map)" function.static final SqlFunctionThe "MAP_FROM_ARRAYS(keysArray, valuesArray)" function.static final SqlFunctionThe "MAP_FROM_ENTRIES(arrayOfEntries)" function.static final SqlFunctionThe "MAP_KEYS(map)" function.static final SqlFunctionThe "MAP_VALUES(map)" function.static final SqlAggFunctionThe "MAX_BY(value, comp)" aggregate function, Spark's equivalent toSqlStdOperatorTable.ARG_MAX.static final SqlFunctionstatic final SqlAggFunctionThe "MIN_BY(condition)" aggregate function, Spark's equivalent toSqlStdOperatorTable.ARG_MIN.static final SqlFunctionThe "MONTHNAME(datetime)" function; returns the name of the month, in the current locale, of a TIMESTAMP or DATE argument.static final SqlFunctionThe "CONVERT(type, expr [,style])" function (Microsoft SQL Server).static final SqlSpecialOperatorThe case-insensitive variant of the NOT LIKE operator.static final SqlSpecialOperatorThe regex variant of the NOT LIKE operator.static final SqlOperatorNULL-safe "<=>" equal operator used by MySQL, for example1<=>NULL.static final SqlBasicFunctionThe "NVL(value, value)" function.static final SqlBasicFunctionThe "NVL2(value, value, value)" function.static final SqlOperatorThe "OFFSET(index)" array subscript operator used by BigQuery.static final SqlOperatorThe "ORDINAL(index)" array subscript operator used by BigQuery.static final SqlFunctionThe "PARSE_DATE(string, string)" function (BigQuery); Converts a string representation of date to a DATE object.static final SqlFunctionThe "PARSE_DATETIME(string, string [, timezone])" function (BigQuery); Formats a timestamp object according to the specified string.static final SqlFunctionThe "PARSE_TIME(string, string)" function (BigQuery); converts a string representation of time to a TIME value.static final SqlFunctionThe "PARSE_TIMESTAMP(string, string [, timezone])" function (BigQuery); Formats a timestamp object according to the specified string.static final SqlFunctionThe "PARSE_URL(urlString, partToExtract [, keyToExtract] )" function.static final SqlAggFunctionThePERCENTILE_CONTfunction, BigQuery's equivalent toSqlStdOperatorTable.PERCENTILE_CONT, but uses anOVERclause rather thanWITHIN GROUP.static final SqlAggFunctionThePERCENTILE_DISCfunction, BigQuery's equivalent toSqlStdOperatorTable.PERCENTILE_DISC, but uses anOVERclause rather thanWITHIN GROUP.static final SqlFunctionstatic final SqlFunctionThePOWER(numeric, numeric)function.static final SqlFunctionThe RANDOM() function.static final SqlFunctionThe "REGEXP(value, regexp)" function, equivalent toRLIKE.static final SqlFunctionThe "REGEXP_CONTAINS(value, regexp)" function.static final SqlBasicFunctionThe "REGEXP_EXTRACT(value, regexp[, position[, occurrence]])" function.static final SqlBasicFunctionThe "REGEXP_EXTRACT_ALL(value, regexp)" function.static final SqlBasicFunctionThe "REGEXP_INSTR(value, regexp [, position[, occurrence, [occurrence_position]]])" function.static final SqlFunctionThe "REGEXP_LIKE(value, regexp)" function, equivalent toRLIKE.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp)" function.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp, rep)" function.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp, rep, pos)" function.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp, rep, pos, [ occurrence | matchType ])" function.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp, rep, pos, matchType)" function.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp, rep, pos, occurrence, matchType)" function.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp, rep)" function.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp, rep)" function.static final SqlFunctionThe "REGEXP_REPLACE(value, regexp, rep, flags)" function.static final SqlFunctionThe "REGEXP_SUBSTR(value, regexp[, position[, occurrence]])" function.static final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionThe "REVERSE(string|array)" function.static final SqlFunctionstatic final SqlSpecialOperatorThe regex variant of the LIKE operator.static final SqlFunctionThe "RPAD(original_value, return_length[, pattern])" function.static final SqlFunctionThe "RTRIM(string)" function.static final SqlFunctionThe "SAFE_ADD(numeric1, numeric2)" function; equivalent to the+operator but returns null if overflow occurs.static final SqlFunctionThe "SAFE_CAST(expr AS type)" function; identical to CAST(), except that if conversion fails, it returns NULL instead of raising an error.static final SqlFunctionThe "SAFE_DIVIDE(numeric1, numeric2)" function; equivalent to the/operator but returns null if an error occurs, such as overflow or division by zero.static final SqlFunctionThe "SAFE_MULTIPLY(numeric1, numeric2)" function; equivalent to the*operator but returns null if overflow occurs.static final SqlFunctionThe "SAFE_NEGATE(numeric)" function; negatesnumericand returns null if overflow occurs.static final SqlOperatorThe "SAFE_OFFSET(index)" array subscript operator used by BigQuery.static final SqlOperatorThe "SAFE_ORDINAL(index)" array subscript operator used by BigQuery.static final SqlFunctionThe "SAFE_SUBTRACT(numeric1, numeric2)" function; equivalent to the-operator but returns null if overflow occurs.static final SqlFunctionstatic final SqlFunctionThe "COTH(value)" function; returns the hyperbolic secant ofvalue.static final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionTheSIND(numeric)function; returns the sine ofvalue.static final SqlFunctionstatic final SqlFunctionThe "SORT_ARRAY(array)" function (Spark).static final SqlFunctionstatic final SqlFunctionThe variant of the SOUNDEX operator.static final SqlFunctionstatic final SqlFunctionThe "SPLIT(string [, delimiter])" function.static final SqlFunctionThe "SPLIT_PART(string, delimiter, n)" function.static final SqlBasicFunctionThe "STARTS_WITH(value1, value2)" function (BigQuery, PostgreSQL).static final SqlFunctionThe "STARTSWITH(value1, value2)" function (Snowflake).static final SqlFunctionThe "STR_TO_MAP(string[, stringDelimiter[, keyValueDelimiter]])" function.static final SqlFunctionstatic final SqlAggFunctionThe "STRING_AGG(value [, separator ] [ ORDER BY ...])" aggregate function, BigQuery and PostgreSQL's equivalent ofSqlStdOperatorTable.LISTAGG.static final SqlFunctionThe "STRING_TO_ARRAY(string, delimiter [, null_string ])" function (PostgreSQL).static final SqlFunctionThe "STRPOS(string, substring)" function.static final SqlFunctionBigQuery's "SUBSTR(string, position [, substringLength ])" function.static final SqlFunctionMySQL's "SUBSTR(string, position [, substringLength ])" function.static final SqlFunctionOracle's "SUBSTR(string, position [, substringLength ])" function.static final SqlFunctionPostgreSQL's "SUBSTR(string, position [, substringLength ])" function.static final SqlFunctionThe "SUBSTRING_INDEX(string, delimiter, count)" function.static final SqlFunctionThe "SYSDATE" function.static final SqlFunctionThe "SYSTIMESTAMP" function.static final SqlFunctionTheTAND(numeric)function; returns the tangent ofvalue.static final SqlFunctionstatic final SqlFunctionThe "TIME" function.static final SqlFunctionThe "TIME_ADD(time, interval)" function (BigQuery); adds interval expression to the specified time expression.static final SqlFunctionThe "TIME_DIFF(time, time, timeUnit)" function (BigQuery); returns the number of timeUnit between the two time expressions.static final SqlFunctionThe "TIME_SUB(time, interval)" function (BigQuery); subtracts an interval from a time, independent of any time zone.static final SqlFunctionThe "TIME_TRUNC(time, timeUnit)" function (BigQuery); truncates a TIME value to the beginning of a timeUnit.static final SqlFunctionThe "TIMESTAMP" function returns a CalciteTIMESTAMP WITH LOCAL TIME ZONE(which BigQuery calls aTIMESTAMP).static final SqlBasicFunctionThe "TIMESTAMP_ADD(timestamp, interval)" function (BigQuery), the two-argument variant of the built-inTIMESTAMPADDfunction, which has three arguments.static final SqlFunctionThe "TIMESTAMP_DIFF(timestamp, timestamp, timeUnit)" function (BigQuery); returns the number of timeUnit between the two timestamp expressions.static final SqlFunctionThe "TIMESTAMP_MICROS(bigint)" function; returns a TIMESTAMP value a given number of micro-seconds after 1970-01-01 00:00:00.static final SqlFunctionThe "TIMESTAMP_MILLIS(bigint)" function; returns a TIMESTAMP value a given number of milliseconds after 1970-01-01 00:00:00.static final SqlFunctionThe "TIMESTAMP_SECONDS(bigint)" function; returns a TIMESTAMP value a given number of seconds after 1970-01-01 00:00:00.static final SqlBasicFunctionThe "TIMESTAMP_SUB(timestamp, interval)" function (BigQuery); subtracts an interval from a timestamp, independent of any time zone.static final SqlFunctionThe "TIMESTAMP_TRUNC(timestamp, timeUnit[, timeZone])" function (BigQuery); truncates aTIMESTAMP WITH LOCAL TIME ZONEvalue to the beginning of a timeUnit.static final SqlFunctionstatic final SqlFunctionstatic final SqlFunctionThe "TO_CHAR(timestamp, format)" function; convertstimestampto string according to the givenformat.static final SqlFunctionThe "TO_CHAR(timestamp, format)" function; convertstimestampto string according to the givenformat.static final SqlFunctionThe "TO_CODE_POINTS(string or binary)" function (BigQuery); Converts astringorbinaryvalue to an array of integers that represent code points or extended ASCII character values.static final SqlFunctionThe "TO_DATE(string1, string2)" function; casts string1 to a DATE using the format specified in string2.static final SqlFunctionThe "TO_DATE(string1, string2)" function for PostgreSQL; casts string1 to a DATE using the format specified in string2.static final SqlFunctionThe "TO_HEX(binary)" function; convertsbinaryinto a hexadecimal varchar.static final SqlFunctionThe "TO_TIMESTAMP(string1, string2)" function; casts string1 to a TIMESTAMP using the format specified in string2.static final SqlFunctionThe "TO_TIMESTAMP(string1, string2)" function for PostgreSQL; casts string1 to a TIMESTAMP using the format specified in string2.static final SqlFunctionTheTRANSLATE(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 final SqlFunctionThe "TRUNC(numeric1 [, integer2])" function.static final SqlFunctionThe "TRY_CAST(expr AS type)" function, equivalent to SAFE_CAST.static final SqlFunctionstatic final SqlFunctionThe "UNIX_DATE(date)" function; returns the number of days since 1970-01-01.static final SqlFunctionThe "UNIX_MICROS(bigint)" function; returns the number of microseconds since 1970-01-01 00:00:00.static final SqlFunctionThe "UNIX_MILLIS(bigint)" function; returns the number of milliseconds since 1970-01-01 00:00:00.static final SqlFunctionThe "UNIX_SECONDS(bigint)" function; returns the number of seconds since 1970-01-01 00:00:00.static final SqlFunctionThe "URL_DECODE(string)" function.static final SqlFunctionThe "URL_ENCODE(string)" function.static final SqlFunction -
Method Summary
-
Field Details
-
AGGREGATE
The "AGGREGATE(m)" aggregate function; aggregates a measure column according to the measure's rollup strategy. This is a Calcite-specific extension.This operator is for SQL (and AST); for internal use (RexNode and Aggregate) use
AGG_M2M. -
CONVERT_TIMEZONE
The "CONVERT_TIMEZONE(tz1, tz2, datetime)" function; converts the timezone ofdatetimefromtz1totz2. -
DATE_ADD
THE "DATE_ADD(date, interval)" function (BigQuery) adds the interval to the date. -
DATE_DIFF
THE "DATE_DIFF(date, date2, timeUnit)" function (BigQuery) returns the number of timeUnit in (date - date2). -
DATEADD
The "DATEADD(timeUnit, numeric, datetime)" function (Microsoft SQL Server, Redshift, Snowflake). -
DATE_ADD_SPARK
The "DATE_ADD(date, numDays)" function (Spark) Returns the date that is num_days after start_date. -
DATE_SUB_SPARK
The "DATE_SUB(date, numDays)" function (Spark) Returns the date that is num_days before start_date. -
ADD_MONTHS
The "ADD_MONTHS(start_date, num_months)" function (SPARK) Returns the date that is num_months after start_date. -
DATEDIFF
The "DATEDIFF(timeUnit, datetime, datetime2)" function (Microsoft SQL Server, Redshift, Snowflake).MySQL has "DATEDIFF(date, date2)" and "TIMEDIFF(time, time2)" functions but Calcite does not implement these because they have no "timeUnit" argument.
-
MSSQL_CONVERT
The "CONVERT(type, expr [,style])" function (Microsoft SQL Server).Syntax:
CONVERT( data_type [ ( length ) ], expression [, style ] )The optional "style" argument specifies how the value is going to be converted; this implementation ignores the
styleparameter.CONVERT(type, expr, style)is equivalent to CAST(expr AS type), and the implementation delegates most of its logic to actual CAST operator.Not to be confused with standard
SqlStdOperatorTable.CONVERT, which converts a string from one character set to another. -
DATE_PART
The "DATE_PART(timeUnit, datetime)" function (Databricks, Postgres, Redshift, Snowflake). -
DATE_SUB
The "DATE_SUB(date, interval)" function (BigQuery); subtracts interval from the date, independent of any time zone. -
DATEPART
The "DATEPART(timeUnit, datetime)" function (Microsoft SQL Server). -
DECODE
The "DECODE(v, v1, result1, [v2, result2, ...], resultN)" function. -
IF
The "IF(condition, thenValue, elseValue)" function. -
NVL
The "NVL(value, value)" function. -
NVL2
The "NVL2(value, value, value)" function. -
IFNULL
The "IFNULL(value, value)" function. -
LEN
The "LEN(string)" function. -
LENGTH
The "LENGTH(string)" function. -
LPAD
The "LPAD(original_value, return_length[, pattern])" function. -
RPAD
The "RPAD(original_value, return_length[, pattern])" function. -
LTRIM
The "LTRIM(string)" function. -
RTRIM
The "RTRIM(string)" function. -
SPLIT
The "SPLIT(string [, delimiter])" function. -
SPLIT_PART
The "SPLIT_PART(string, delimiter, n)" function. -
STRPOS
The "STRPOS(string, substring)" function. -
INSTR
The "INSTR(string, substring [, position [, occurrence]])" function. -
STRING_TO_ARRAY
The "STRING_TO_ARRAY(string, delimiter [, null_string ])" function (PostgreSQL). -
ENDS_WITH
The "ENDS_WITH(value1, value2)" function (BigQuery). -
ENDSWITH
The "ENDSWITH(value1, value2)" function (Snowflake). -
STARTS_WITH
The "STARTS_WITH(value1, value2)" function (BigQuery, PostgreSQL). -
STARTSWITH
The "STARTSWITH(value1, value2)" function (Snowflake). -
SUBSTR_BIG_QUERY
BigQuery's "SUBSTR(string, position [, substringLength ])" function. -
SUBSTR_MYSQL
MySQL's "SUBSTR(string, position [, substringLength ])" function. -
SUBSTR_ORACLE
Oracle's "SUBSTR(string, position [, substringLength ])" function.It has different semantics to standard SQL's
SqlStdOperatorTable.SUBSTRINGfunction:- If
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); - If
position= 0, treatpositionas 1; - If
position< 0, treatpositionas "length(string) + position + 1".
- If
-
CONVERT_ORACLE
-
SUBSTR_POSTGRESQL
PostgreSQL's "SUBSTR(string, position [, substringLength ])" function. -
PARSE_URL
The "PARSE_URL(urlString, partToExtract [, keyToExtract] )" function. -
FIND_IN_SET
The "FIND_IN_SET(matchStr, textStr)" function. -
GREATEST
The "GREATEST(value, value)" function. -
GREATEST_PG
The "GREATEST(value, value)" function. Identical to the standardGREATESTfunction except it skips null values and only returns null if all parameters are nulls. -
LEAST
The "LEAST(value, value)" function. -
LEAST_PG
The "LEAST(value, value)" function. Identical to the standardLEASTfunction except it skips null values and only returns null if all parameters are nulls. -
CEIL_BIG_QUERY
The "CEIL(value)" function. Identical to the standardCEILfunction except the return type should be a double if the operand is an integer. -
FLOOR_BIG_QUERY
The "FLOOR(value)" function. Identical to the standardFLOORfunction except the return type should be a double if the operand is an integer. -
TRANSLATE3
TheTRANSLATE(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.
-
JSON_TYPE
-
JSON_DEPTH
-
JSON_LENGTH
-
JSON_KEYS
-
JSON_PRETTY
-
JSON_REMOVE
-
JSON_STORAGE_SIZE
-
JSON_INSERT
-
JSON_REPLACE
-
JSON_SET
-
REGEXP_CONTAINS
The "REGEXP_CONTAINS(value, regexp)" function. Returns TRUE if value is a partial match for the regular expression, regexp. -
REGEXP_EXTRACT
The "REGEXP_EXTRACT(value, regexp[, position[, occurrence]])" function. Returns the substring in value that matches the regexp. Returns NULL if there is no match. -
REGEXP_EXTRACT_ALL
The "REGEXP_EXTRACT_ALL(value, regexp)" function. Returns the substring in value that matches the regexp. Returns NULL if there is no match. -
REGEXP_INSTR
The "REGEXP_INSTR(value, regexp [, position[, occurrence, [occurrence_position]]])" function. Returns the lowest 1-based position of a regexp in value. Returns NULL if there is no match. -
REGEXP_REPLACE_2
The "REGEXP_REPLACE(value, regexp)" function. Replaces all substrings of value that match regexp withrepand returns modified value. -
REGEXP_REPLACE_3
The "REGEXP_REPLACE(value, regexp, rep)" function. Replaces all substrings of value that match regexp withrepand returns modified value. -
REGEXP_REPLACE_4
The "REGEXP_REPLACE(value, regexp, rep, pos)" function. Replaces all substrings of value that match regexp withrepand returns modified value. Start searching value from character position pos. -
REGEXP_REPLACE_5
The "REGEXP_REPLACE(value, regexp, rep, pos, [ occurrence | matchType ])" function. Replaces all substrings of value that match regexp withrepand returns modified value. Start searching value from character position pos. Replace only the occurrence match or all matches if occurrence is 0. matchType is a string of flags to apply to the search. -
REGEXP_REPLACE_5_ORACLE
The "REGEXP_REPLACE(value, regexp, rep, pos, matchType)" function. Replaces all substrings of value that match regexp withrepand returns modified value. Start searching value from character position pos. Replace only the occurrence match or all matches if occurrence is 0. -
REGEXP_REPLACE_6
The "REGEXP_REPLACE(value, regexp, rep, pos, occurrence, matchType)" function. Replaces all substrings of value that match regexp withrepand returns modified value. Start searching value from character position pos. Replace only the occurrence match or all matches if occurrence is 0. matchType is a string of flags to apply to the search. -
REGEXP_REPLACE_BIG_QUERY_3
The "REGEXP_REPLACE(value, regexp, rep)" function. Replaces all substrings of value that match regexp withrepand returns modified value. -
REGEXP_REPLACE_PG_3
The "REGEXP_REPLACE(value, regexp, rep)" function. Replaces all substrings of value that match regexp withrepand returns modified value. -
REGEXP_REPLACE_PG_4
The "REGEXP_REPLACE(value, regexp, rep, flags)" function. Replaces all substrings of value that match regexp withrepand returns modified value. flags are applied to the search. -
REGEXP_SUBSTR
The "REGEXP_SUBSTR(value, regexp[, position[, occurrence]])" function. Returns the substring in value that matches the regexp. Returns NULL if there is no match. -
REGEXP
The "REGEXP(value, regexp)" function, equivalent toRLIKE. -
REGEXP_LIKE
The "REGEXP_LIKE(value, regexp)" function, equivalent toRLIKE. -
COMPRESS
-
URL_DECODE
The "URL_DECODE(string)" function. -
URL_ENCODE
The "URL_ENCODE(string)" function. -
EXTRACT_VALUE
-
XML_TRANSFORM
-
EXTRACT_XML
-
EXISTS_NODE
-
BOOL_AND
The "BOOL_AND(condition)" aggregate function, PostgreSQL and Redshift's equivalent toSqlStdOperatorTable.EVERY. -
BOOL_OR
The "BOOL_OR(condition)" aggregate function, PostgreSQL and Redshift's equivalent toSqlStdOperatorTable.SOME. -
BOOLAND_AGG
The "BOOLAND_AGG(condition)" aggregate function, Snowflake's equivalent toSqlStdOperatorTable.EVERY. -
BOOLOR_AGG
The "BOOLOR_AGG(condition)" aggregate function, Snowflake's equivalent toSqlStdOperatorTable.SOME. -
LOGICAL_AND
The "LOGICAL_AND(condition)" aggregate function, BigQuery's equivalent toSqlStdOperatorTable.EVERY. -
LOGICAL_OR
The "LOGICAL_OR(condition)" aggregate function, BigQuery's equivalent toSqlStdOperatorTable.SOME. -
COUNTIF
The "COUNTIF(condition) [OVER (...)]" function, in BigQuery, returns the count of TRUE values for expression.COUNTIF(b)is equivalent toCOUNT(*) FILTER (WHERE b). -
ARRAY_AGG
The "ARRAY_AGG(value [ ORDER BY ...])" aggregate function, in BigQuery and PostgreSQL, gathers values into arrays. -
ARRAY_CONCAT_AGG
The "ARRAY_CONCAT_AGG(value [ ORDER BY ...])" aggregate function, in BigQuery and PostgreSQL, concatenates array values into arrays. -
STRING_AGG
The "STRING_AGG(value [, separator ] [ ORDER BY ...])" aggregate function, BigQuery and PostgreSQL's equivalent ofSqlStdOperatorTable.LISTAGG.STRING_AGG(v, sep ORDER BY x, y)is implemented by rewriting toLISTAGG(v, sep) WITHIN GROUP (ORDER BY x, y). -
GROUP_CONCAT
The "GROUP_CONCAT([DISTINCT] expr [, ...] [ORDER BY ...] [SEPARATOR sep])" aggregate function, MySQL's equivalent ofSqlStdOperatorTable.LISTAGG.GROUP_CONCAT(v ORDER BY x, y SEPARATOR s)is implemented by rewriting toLISTAGG(v, s) WITHIN GROUP (ORDER BY x, y). -
MAX_BY
The "MAX_BY(value, comp)" aggregate function, Spark's equivalent toSqlStdOperatorTable.ARG_MAX. -
MIN_BY
The "MIN_BY(condition)" aggregate function, Spark's equivalent toSqlStdOperatorTable.ARG_MIN. -
PERCENTILE_CONT2
ThePERCENTILE_CONTfunction, BigQuery's equivalent toSqlStdOperatorTable.PERCENTILE_CONT, but uses anOVERclause rather thanWITHIN GROUP. -
PERCENTILE_DISC2
ThePERCENTILE_DISCfunction, BigQuery's equivalent toSqlStdOperatorTable.PERCENTILE_DISC, but uses anOVERclause rather thanWITHIN GROUP. -
DATE
The "DATE" function. It has the following overloads:DATE(string)is syntactic sugar forCAST(string AS DATE)DATE(year, month, day)DATE(timestampLtz [, timeZone])DATE(timestamp)
-
DATETIME
The "DATETIME" function returns a CalciteTIMESTAMP(which BigQuery calls aDATETIME).It has the following overloads:
DATETIME(year, month, day, hour, minute, second)DATETIME(date[, time])DATETIME(timestampLtz[, timeZone])
-
TIME
The "TIME" function. It has the following overloads:TIME(hour, minute, second)TIME(timestampLtz [, timeZone])TIME(timestamp)
-
TIMESTAMP
The "TIMESTAMP" function returns a CalciteTIMESTAMP WITH LOCAL TIME ZONE(which BigQuery calls aTIMESTAMP). It has the following overloads:TIMESTAMP(string[, timeZone])TIMESTAMP(date[, timeZone])TIMESTAMP(timestamp[, timeZone])
-
CURRENT_DATETIME
The "CURRENT_DATETIME([timezone])" function. -
SYSDATE
The "SYSDATE" function. -
SYSTIMESTAMP
The "SYSTIMESTAMP" function. -
DATE_FROM_UNIX_DATE
The "DATE_FROM_UNIX_DATE(integer)" function; returns a DATE value a given number of seconds after 1970-01-01. -
UNIX_DATE
The "UNIX_DATE(date)" function; returns the number of days since 1970-01-01. -
CONTAINS_SUBSTR
"CONTAINS_SUBSTR(expression, string[, json_scope => json_scope_value ])" function; returns whether string exists as substring in expression, with optional json_scope argument. -
MONTHNAME
The "MONTHNAME(datetime)" function; returns the name of the month, in the current locale, of a TIMESTAMP or DATE argument. -
DAYNAME
The "DAYNAME(datetime)" function; returns the name of the day of the week, in the current locale, of a TIMESTAMP or DATE argument. -
LEFT
-
REPEAT
-
RIGHT
-
SPACE
-
STRCMP
-
SOUNDEX
-
SOUNDEX_SPARK
The variant of the SOUNDEX operator. -
DIFFERENCE
-
ILIKE
The case-insensitive variant of the LIKE operator. -
NOT_ILIKE
The case-insensitive variant of the NOT LIKE operator. -
RLIKE
The regex variant of the LIKE operator. -
NOT_RLIKE
The regex variant of the NOT LIKE operator. -
BIT_COUNT_BIG_QUERY
Alias forSqlStdOperatorTable.BITCOUNT. -
BIT_COUNT_MYSQL
-
CONCAT_FUNCTION
The "CONCAT(arg, ...)" function that concatenates strings. For example, "CONCAT('a', 'bc', 'd')" returns "abcd".It accepts at least 1 argument and returns null if any of the arguments is null.
-
CONCAT_FUNCTION_WITH_NULL
The "CONCAT(arg, ...)" function that concatenates strings, which never returns null. For example, "CONCAT('a', 'bc', 'd')" returns "abcd".If one of the arguments is null, it will be treated as empty string. "CONCAT('a', null)" returns "a". "CONCAT('a', null, 'b')" returns "ab".
Returns empty string only when all arguments are null or the empty string. "CONCAT(null)" returns "". "CONCAT(null, '')" returns "". "CONCAT(null, null, null)" returns "".
It differs from
CONCAT_FUNCTIONwhen processing null values. -
CONCAT2
The "CONCAT(arg0, arg1)" function that concatenates strings. For example, "CONCAT('a', 'bc')" returns "abc".If one of the arguments is null, it will be treated as empty string. "CONCAT('a', null)" returns "a".
Returns null only when both arguments are null. "CONCAT(null, null)" returns null.
It is assigned
SqlKind.CONCAT2to make it not equal toCONCAT_FUNCTION. -
CONCAT_WS
The "CONCAT_WS(separator, arg1, ...)" function (MySQL); concatenates strings with separator, and treats null arguments as empty strings. For example:CONCAT_WS(',', 'a')returns "a";CONCAT_WS(',', 'a', 'b')returns "a,b".
Returns null if the separator arg is null. For example,
CONCAT_WS(null, 'a', 'b')returns null.If all the arguments except the separator are null, it also returns the empty string. For example,
CONCAT_WS(',', null, null)returns "". -
CONCAT_WS_POSTGRESQL
The "CONCAT_WS(separator, arg1, ...)" function (Postgres).Differs from
CONCAT_WS(MySQL) in that its arg1 can be of any type, not limited to string. For example:CONCAT_WS(',', 'a')returns "a";CONCAT_WS(',', 'a', DATE '1945-02-24')returns "a,1945-02-24";CONCAT_WS(',', 'a', ARRAY['b', 'c'])returns "a,[b, c]".
-
CONCAT_WS_MSSQL
The "CONCAT_WS(separator, arg1, arg2, ...)" function in (MSSQL).Differs from
CONCAT_WS(MySQL, Postgres) in that it accepts between 3 and 254 arguments, and never returns null (even if the separator is null). For example:CONCAT_WS(',', 'a', 'b')returns "a,b";CONCAT_WS(null, 'a', 'b')returns "ab";CONCAT_WS(',', null, null)returns "";CONCAT_WS(null, null, null)returns "".
-
CONCAT_WS_SPARK
The "CONCAT_WS(separator[, str | array(str)]+)" function in (SPARK).For example:
CONCAT_WS(',', 'a', 'b')returns "a,b";CONCAT_WS(null, 'a', 'b')returns NULL";CONCAT_WS('s')returns "";CONCAT_WS('/', 'a', null, 'b')returns "a/b";CONCAT_WS('/', array('a', 'b'))returns "a/b";CONCAT_WS('/', 'c', array('a', 'b'))returns "c/a/b".
-
ARRAY
The "ARRAY(exp, ...)" function (Spark); compare with the standard array value constructor, "ARRAY [exp, ...]". -
MAP
The "MAP(key, value, ...)" function (Spark); compare with the standard map value constructor, "MAP[key, value, ...]". -
ARRAY_APPEND
The "ARRAY_APPEND(array, element)" function. -
EXISTS
The "EXISTS(array, lambda)" function (Spark); returns whether a predicate holds for one or more elements in the array. -
ARRAY_COMPACT
The "ARRAY_COMPACT(array)" function. -
ARRAY_CONCAT
The "ARRAY_CONCAT(array [, array]*)" function. -
ARRAY_CONTAINS
The "ARRAY_CONTAINS(array, element)" function. -
ARRAY_DISTINCT
The "ARRAY_DISTINCT(array)" function. -
ARRAY_EXCEPT
The "ARRAY_EXCEPT(array1, array2)" function. -
ARRAY_INSERT
The "ARRAY_INSERT(array, pos, val)" function (Spark). -
ARRAY_INTERSECT
The "ARRAY_INTERSECT(array1, array2)" function. -
ARRAY_JOIN
The "ARRAY_JOIN(array, delimiter [, nullText ])" function. -
ARRAY_LENGTH
The "ARRAY_LENGTH(array)" function. -
ARRAY_MAX
The "ARRAY_MAX(array)" function. -
ARRAY_MIN
The "ARRAY_MIN(array)" function. -
ARRAY_POSITION
The "ARRAY_POSITION(array, element)" function. -
ARRAY_PREPEND
The "ARRAY_PREPEND(array, element)" function. -
ARRAY_REMOVE
The "ARRAY_REMOVE(array, element)" function. -
ARRAY_REPEAT
The "ARRAY_REPEAT(element, count)" function. -
ARRAY_REVERSE
The "ARRAY_REVERSE(array)" function. -
ARRAY_SIZE
The "ARRAY_SIZE(array)" function. -
ARRAY_SLICE
The "ARRAY_SLICE(array, start, length)" function. -
ARRAY_UNION
The "ARRAY_UNION(array1, array2)" function. -
ARRAY_TO_STRING
The "ARRAY_TO_STRING(array, delimiter [, nullText ])" function. -
ARRAYS_OVERLAP
The "ARRAYS_OVERLAP(array1, array2)" function (Spark). -
ARRAYS_ZIP
The "ARRAYS_ZIP(array, ...)" function (Spark). -
SORT_ARRAY
The "SORT_ARRAY(array)" function (Spark). -
MAP_CONCAT
The "MAP_CONCAT(map [, map]*)" function. -
MAP_ENTRIES
The "MAP_ENTRIES(map)" function. -
MAP_KEYS
The "MAP_KEYS(map)" function. -
MAP_VALUES
The "MAP_VALUES(map)" function. -
MAP_CONTAINS_KEY
The "MAP_CONTAINS_KEY(map, key)" function. -
MAP_FROM_ARRAYS
The "MAP_FROM_ARRAYS(keysArray, valuesArray)" function. -
MAP_FROM_ENTRIES
The "MAP_FROM_ENTRIES(arrayOfEntries)" function. -
STR_TO_MAP
The "STR_TO_MAP(string[, stringDelimiter[, keyValueDelimiter]])" function. -
SUBSTRING_INDEX
The "SUBSTRING_INDEX(string, delimiter, count)" function. -
REVERSE
-
REVERSE_SPARK
The "REVERSE(string|array)" function. -
LEVENSHTEIN
The "LEVENSHTEIN(string1, string2)" function. -
FROM_BASE64
-
TO_BASE64
-
BASE64
-
UN_BASE64
-
FROM_BASE32
-
TO_BASE32
-
FROM_HEX
The "FROM_HEX(varchar)" function; converts a hexadecimal-encodedvarcharinto bytes. -
TO_HEX
The "TO_HEX(binary)" function; convertsbinaryinto a hexadecimal varchar. -
HEX
The "HEX(string)" function; convertsstringinto a hexadecimal varchar. -
FORMAT_NUMBER
The "FORMAT_NUMBER(value, decimalOrFormat)" function. -
TO_CHAR
The "TO_CHAR(timestamp, format)" function; convertstimestampto string according to the givenformat.(
TO_CHARis not supported in MySQL, but it is supported in MariaDB, a variant of MySQL covered bySqlLibrary.MYSQL.) -
TO_CHAR_PG
The "TO_CHAR(timestamp, format)" function; convertstimestampto string according to the givenformat. -
TO_DATE
The "TO_DATE(string1, string2)" function; casts string1 to a DATE using the format specified in string2. -
TO_DATE_PG
The "TO_DATE(string1, string2)" function for PostgreSQL; casts string1 to a DATE using the format specified in string2. -
TO_TIMESTAMP
The "TO_TIMESTAMP(string1, string2)" function; casts string1 to a TIMESTAMP using the format specified in string2. -
TO_TIMESTAMP_PG
The "TO_TIMESTAMP(string1, string2)" function for PostgreSQL; casts string1 to a TIMESTAMP using the format specified in string2. -
PARSE_TIME
The "PARSE_TIME(string, string)" function (BigQuery); converts a string representation of time to a TIME value. -
PARSE_DATE
The "PARSE_DATE(string, string)" function (BigQuery); Converts a string representation of date to a DATE object. -
PARSE_TIMESTAMP
The "PARSE_TIMESTAMP(string, string [, timezone])" function (BigQuery); Formats a timestamp object according to the specified string.In BigQuery, the "TIMESTAMP" datatype maps to Calcite's TIMESTAMP_WITH_LOCAL_TIME_ZONE
-
PARSE_DATETIME
The "PARSE_DATETIME(string, string [, timezone])" function (BigQuery); Formats a timestamp object according to the specified string.Note that the
TIMESTAMPtype of Calcite and Standard SQL is calledDATETIMEin BigQuery. -
FORMAT_TIME
The "FORMAT_TIME(string, time)" function (BigQuery); Formats a time object according to the specified string. -
FORMAT_DATE
The "FORMAT_DATE(string, date)" function (BigQuery); Formats a date object according to the specified string. -
FORMAT_TIMESTAMP
The "FORMAT_TIMESTAMP(string, timestamp)" function (BigQuery); Formats a timestamp object according to the specified string.In BigQuery, the "TIMESTAMP" datatype maps to Calcite's TIMESTAMP_WITH_LOCAL_TIME_ZONE
-
FORMAT_DATETIME
The "FORMAT_DATETIME(string, timestamp)" function (BigQuery); formats a timestamp object according to the specified string.Note that the
TIMESTAMPtype of Calcite and Standard SQL is calledDATETIMEin BigQuery. -
TIMESTAMP_ADD2
The "TIMESTAMP_ADD(timestamp, interval)" function (BigQuery), the two-argument variant of the built-inTIMESTAMPADDfunction, which has three arguments.In BigQuery, the syntax is "TIMESTAMP_ADD(timestamp, INTERVAL int64_expression date_part)" but in Calcite the second argument can be any interval expression, not just an interval literal.
-
TIMESTAMP_DIFF3
The "TIMESTAMP_DIFF(timestamp, timestamp, timeUnit)" function (BigQuery); returns the number of timeUnit between the two timestamp expressions.TIMESTAMP_DIFF(t1, t2, unit)is equivalent toTIMESTAMPDIFF(unit, t2, t1)and(t1 - t2) unit. -
TIME_ADD
The "TIME_ADD(time, interval)" function (BigQuery); adds interval expression to the specified time expression. -
TIME_DIFF
The "TIME_DIFF(time, time, timeUnit)" function (BigQuery); returns the number of timeUnit between the two time expressions. -
DATE_TRUNC
The "DATE_TRUNC(date, timeUnit)" function (BigQuery); truncates a DATE value to the beginning of a timeUnit. -
TIME_SUB
The "TIME_SUB(time, interval)" function (BigQuery); subtracts an interval from a time, independent of any time zone.In BigQuery, the syntax is "TIME_SUB(time, INTERVAL int64 date_part)" but in Calcite the second argument can be any interval expression, not just an interval literal.
-
TIME_TRUNC
The "TIME_TRUNC(time, timeUnit)" function (BigQuery); truncates a TIME value to the beginning of a timeUnit. -
TIMESTAMP_SUB
The "TIMESTAMP_SUB(timestamp, interval)" function (BigQuery); subtracts an interval from a timestamp, independent of any time zone.In BigQuery, the syntax is "TIMESTAMP_SUB(timestamp, INTERVAL int64 date_part)" but in Calcite the second argument can be any interval expression, not just an interval literal.
-
DATETIME_SUB
The "DATETIME_SUB(timestamp, interval)" function (BigQuery).Note that the
TIMESTAMPtype of Calcite and Standard SQL is calledDATETIMEin BigQuery.A synonym for
TIMESTAMP_SUB, which supports bothTIMESTAMPandTIMESTAMP WITH LOCAL TIME ZONEoperands. -
TIMESTAMP_TRUNC
The "TIMESTAMP_TRUNC(timestamp, timeUnit[, timeZone])" function (BigQuery); truncates aTIMESTAMP WITH LOCAL TIME ZONEvalue to the beginning of a timeUnit.Note that the
TIMESTAMP WITH LOCAL TIME ZONEtype of Calcite is calledTIMESTAMPin BigQuery. -
DATETIME_TRUNC
The "DATETIME_TRUNC(timestamp, timeUnit)" function (BigQuery); truncates a TIMESTAMP value to the beginning of a timeUnit.Note that the
TIMESTAMPtype of Calcite and Standard SQL is calledDATETIMEin BigQuery. -
TIMESTAMP_SECONDS
The "TIMESTAMP_SECONDS(bigint)" function; returns a TIMESTAMP value a given number of seconds after 1970-01-01 00:00:00. -
TIMESTAMP_MILLIS
The "TIMESTAMP_MILLIS(bigint)" function; returns a TIMESTAMP value a given number of milliseconds after 1970-01-01 00:00:00. -
TIMESTAMP_MICROS
The "TIMESTAMP_MICROS(bigint)" function; returns a TIMESTAMP value a given number of micro-seconds after 1970-01-01 00:00:00. -
UNIX_SECONDS
The "UNIX_SECONDS(bigint)" function; returns the number of seconds since 1970-01-01 00:00:00. -
UNIX_MILLIS
The "UNIX_MILLIS(bigint)" function; returns the number of milliseconds since 1970-01-01 00:00:00. -
UNIX_MICROS
The "UNIX_MICROS(bigint)" function; returns the number of microseconds since 1970-01-01 00:00:00. -
DATETIME_ADD
The "DATETIME_ADD(timestamp, interval)" function (BigQuery). AsTIMESTAMP_ADD, returns a CalciteTIMESTAMP(which BigQuery calls aDATETIME). -
DATETIME_DIFF
The "DATETIME_DIFF(timestamp, timestamp2, timeUnit)" function (BigQuery).Note that the
TIMESTAMPtype of Calcite and Standard SQL is calledDATETIMEin BigQuery. -
SAFE_ADD
The "SAFE_ADD(numeric1, numeric2)" function; equivalent to the+operator but returns null if overflow occurs. -
SAFE_DIVIDE
The "SAFE_DIVIDE(numeric1, numeric2)" function; equivalent to the/operator but returns null if an error occurs, such as overflow or division by zero. -
SAFE_MULTIPLY
The "SAFE_MULTIPLY(numeric1, numeric2)" function; equivalent to the*operator but returns null if overflow occurs. -
SAFE_NEGATE
The "SAFE_NEGATE(numeric)" function; negatesnumericand returns null if overflow occurs. -
SAFE_SUBTRACT
The "SAFE_SUBTRACT(numeric1, numeric2)" function; equivalent to the-operator but returns null if overflow occurs. -
CHAR
The "CHAR(n)" function; returns the character whose ASCII code isn% 256, or null ifn< 0. -
CHR
The "CHR(n)" function; returns the character whose UTF-8 code isn. -
CODE_POINTS_TO_BYTES
The "CODE_POINTS_TO_BYTES(integers)" function (BigQuery); Converts an array of extended ASCII code points to bytes. -
CODE_POINTS_TO_STRING
The "CODE_POINTS_TO_STRING(integers)" function (BigQuery); Converts an array of Unicode code points to string. -
TO_CODE_POINTS
The "TO_CODE_POINTS(string or binary)" function (BigQuery); Converts astringorbinaryvalue to an array of integers that represent code points or extended ASCII character values. -
TANH
-
COTH
The "COTH(value)" function; returns the hyperbolic cotangent ofvalue. -
COSH
-
ACOSH
TheACOSH(numeric)function; returns the inverse hyperbolic cosine ofvalue. -
ASINH
TheASINH(numeric)function; returns the inverse hyperbolic sine ofvalue. -
ATANH
TheATANH(numeric)function; returns the inverse hyperbolic tangent ofvalue. -
COSD
TheCOSD(numeric)function; returns the cosine ofvalue.valueis treated as degrees. -
SIND
TheSIND(numeric)function; returns the sine ofvalue.valueis treated as degrees. -
TAND
TheTAND(numeric)function; returns the tangent ofvalue.valueis treated as degrees. -
ACOSD
TheACOSD(numeric)function; returns the inverse cosine ofvaluein degrees. -
ASIND
TheACOSD(numeric)function; returns the inverse sine ofvaluein degrees. -
ATAND
TheACOSD(numeric)function; returns the inverse tangent ofvaluein degrees. -
SECH
The "COTH(value)" function; returns the hyperbolic secant ofvalue. -
CSCH
The "COTH(value)" function; returns the hyperbolic cosecant ofvalue. -
SINH
-
CSC
-
SEC
-
FACTORIAL
TheFACTORIAL(integer)function. Returns the factorial of integer, the range of integer is [0, 20]. Otherwise, returns NULL. -
BIN
-
MD5
-
CRC32
-
SHA1
-
SHA256
-
SHA512
-
IS_INF
The "IS_INF(value)" function. Returns whether value is infinite. -
IS_NAN
The "IS_NAN(value)" function. Returns whether value is NaN. -
LOG
The "LOG(value [, value2])" function. -
LOG_MYSQL
The "LOG(numeric1 [, numeric2 ]) " function. Returns the logarithm of numeric2 to base numeric1. -
LOG_POSTGRES
The "LOG(numeric1 [, numeric2 ]) " function. Returns the logarithm of numeric2 to base numeric1. -
LOG2
The "LOG2(numeric)" function. Returns the base 2 logarithm of numeric. -
LOG1P
The "LOG1p(numeric)" function. Returns log(1 + numeric). -
POW
-
POWER_PG
ThePOWER(numeric, numeric)function.The return type is
DECIMALif either argument is aDECIMAL. In all other cases, the return type is a double. -
TRUNC_BIG_QUERY
The "TRUNC(numeric1 [, integer2])" function. Identical to the standardTRUNCATEfunction except the return type should be a double if numeric1 is an integer. -
INFIX_CAST
Infix "::" cast operator used by PostgreSQL, for example'100'::INTEGER. -
SAFE_CAST
The "SAFE_CAST(expr AS type)" function; identical to CAST(), except that if conversion fails, it returns NULL instead of raising an error. -
TRY_CAST
The "TRY_CAST(expr AS type)" function, equivalent to SAFE_CAST. -
OFFSET
The "OFFSET(index)" array subscript operator used by BigQuery. The index starts at 0 and produces an error if the index is out of range. -
ORDINAL
The "ORDINAL(index)" array subscript operator used by BigQuery. The index starts at 1 and produces an error if the index is out of range. -
SAFE_OFFSET
The "SAFE_OFFSET(index)" array subscript operator used by BigQuery. The index starts at 0 and returns null if the index is out of range. -
SAFE_ORDINAL
The "SAFE_ORDINAL(index)" array subscript operator used by BigQuery. The index starts at 1 and returns null if the index is out of range. -
NULL_SAFE_EQUAL
NULL-safe "<=>" equal operator used by MySQL, for example1<=>NULL. -
BITAND_AGG
The "BITAND_AGG(expression)" function. Equivalent to the standard "BIT_AND(expression)". -
BITOR_AGG
The "BITOR_AGG(expression)" function. Equivalent to the standard "BIT_OR(expression)". -
BIT_LENGTH
The "BIT_LENGTH(string or binary)" function. -
BIT_GET
The "BIT_GET(value, position)" function. -
GETBIT
Alias forBIT_GET. -
RANDOM
The RANDOM() function. Equivalent to RAND().
-