Package org.apache.calcite.sql.fun
package org.apache.calcite.sql.fun
Defines the set of standard SQL rowlevel functions and
operators.
The standard set of rowlevel functions and operators are declared in
class SqlStdOperatorTable
. Anonymous inner
classes within that table are allowed only for specifying an operator's test
function; if other custom code is needed for an operator, it should be
implemented in a toplevel class within this package instead. Operators
which are not rowlevel (e.g. select and join) should be defined in package
org.apache.calcite.sql
instead.

ClassDescriptionAn annotation that is read by
SqlLibraryOperatorTableFactory
to add functions and operators to a library.Deprecated.Base class for grouping functionsGROUP_ID
,GROUPING_ID
,GROUPING
.Base class for time functions such as "LOCALTIME", "LOCALTIME(n)".Definition of theANY_VALUE
aggregate functions, returning any one of the values which go into it.Definition of the SQL:2003 standard ARRAY query constructor,ARRAY (<query>)
.Definition of the SQL:2003 standard ARRAY constructor,ARRAY [<expr>, ...]
.Avg
is an aggregator which returns the average of the values which go into it.Deprecated.Base class for functions such as "USER", "CURRENT_ROLE", and "CURRENT_PATH".Concrete implementation ofSqlAggFunction
.Defines the BETWEEN operator.Defines the "SYMMETRIC" and "ASYMMETRIC" keywords.Definition of theBIT_AND
andBIT_OR
aggregate functions, returning the bitwise AND/OR of all nonnull input values, or null if none.ASqlCase
is a node of a parse tree which represents a case statement.An operator describing aCASE
,NULLIF
orCOALESCE
expression.SqlCastFunction.TheCOALESCE
function.SqlCollectionTableOperator is the "table function derived table" operator.SqlColumnListConstructor defines the nonstandard constructor used to pass a COLUMN_LIST parameter to a UDX.TheCONVERT
function, which converts a string from one character set to another.Definition of the SQLCOUNT
aggregation function.Covar
is an aggregator which returns the Covariance of the values which go into it.Deprecated.TheCURRENT_DATE
function.SqlCursorConstructor defines the nonstandard CURSOR(<query>) constructor.SqlDatePartFunction represents the SQL:1999 standardYEAR
,QUARTER
,MONTH
andDAY
functions.Operator that adds an INTERVAL to a DATETIME.A special operator for the subtraction of two DATETIMEs.The dot operator.
, used to access a field of a record.The SQLEXTRACT
operator.FIRST_VALUE
andLAST_VALUE
aggregate functions return the first or the last value in a list of values that are input to the function.Definition of the "FLOOR" and "CEIL" builtin SQL functions.HISTOGRAM
is the base operator that supports the Histogram MIN/MAX aggregate functions.Definition of the SQLIN
operator, which tests for a value's membership in a subquery or a list of values.Contains internal operators.Interval expression.The item operator[ ... ]
, used to access a given element of an array, map or struct.TheJSON_OBJECTAGG
aggregate function.TheJSON_ARRAY
function.TheJSON_DEPTH
function.TheJSON_EXISTS
function.TheJSON_KEYS
function.TheJSON_LENGTH
function.Definition of theJSON_INSERT
,JSON_REPLACE
andJSON_SET
JSON Modify functions.TheJSON_OBJECTAGG
aggregate function.TheJSON_OBJECT
function.TheJSON_TYPE
function.TheJSON_QUERY
function.TheJSON_REMOVE
function.TheJSON_STORAGE_SIZE
function.TheJSON_TYPE
function.The JSON value expression operator that indicates that the value expression should be parsed as JSON.TheJSON_VALUE
function.LEAD
andLAG
aggregate functions return the value of given expression evaluated at given offset.A library is a collection of SQL functions and operators.Defines functions and operators that are not part of standard SQL but belong to one or more other dialects of SQL.Factory that creates operator tables that consist of functions and operators for particular named libraries.An operator describing theLIKE
andSIMILAR
operators.TheLITERAL_AGG
aggregate function.Internal operator, by which the parser represents a continued string literal.Definition of the MAP query constructor,MAP (<query>)
.Definition of the MAP constructor,MAP [<key>, <value>, ...]
.Definition of theMIN
andMAX
aggregate functions, returning the returns the smallest/largest of the values which go into it.Base class for binary operators such as addition, subtraction, and multiplication which are monotonic for the patternsm op c
andc op m
where m is any monotonic expression and c is a constant.Base class for unary operators such as FLOOR/CEIL which are monotonic for monotonic inputs.Multiset MEMBER OF.Definition of the SQL:2003 standard MULTISET query constructor,MULTISET (<query>)
.An operator which performs set operations on multisets, such as "MULTISET UNION ALL".Definition of the SQL:2003 standard MULTISET constructor,MULTISET [<expr>, ...]
.SqlNewOperator represents an SQLnew specification
such asNEW UDT(1, 2)
.NTH_VALUE
windowed aggregate function returns the value of an expression evaluated at then
th row of the window frame.NTILE
aggregate function return the value of given expression evaluated at given offset.TheNULLIF
function.SqlOverlapsOperator represents the SQL:1999 standardOVERLAPS
function.TheOVERLAY
function.ThePOSITION
function.An operator describing the~
operator.Definition of the SQLALL
andSOME
operators.TheRAND
function.TheRAND_INTEGER
function.The REGEXP_REPLACE(source_string, pattern, replacement [, pos, occurrence, match_type]) searches for a regular expression pattern and replaces every occurrence of the pattern with the specified string.Definition of the SQLREGR_COUNT
aggregation function.SqlRowOperator represents the special ROW constructor.Operator that returns the current or next value of a sequence.SINGLE_VALUE
aggregate function returns the input value if there is only one value in the input; Otherwise it triggers a runtime error.Utilities for spatial type functions.Returns the geometries of a geometry.Returns the points or rectangles in a grid that covers a given geometry.Implementation ofSqlOperatorTable
containing the standard operators and functions.Base class for string functions such as "USER", "CURRENT_ROLE", and "CURRENT_PATH".Definition of the "SUBSTRING" builtin SQL function.Sum
is an aggregator which returns the sum of the values which go into it.Sum0
is an aggregator which returns the sum of the values which go into it likeSum
.An internal operator that throws an exception.TheTIMESTAMPADD
function, which adds an interval to a datetime (TIMESTAMP, TIME or DATE).Definition of the "TRANSLATE" builtin SQL function that takes 3 arguments.Common base for theTRANSLATE(USING)
andCONVERT(USING)
function, which is different fromSqlLibraryOperators.TRANSLATE3
andSqlLibraryOperators.MSSQL_CONVERT
.Definition of the "TRIM" builtin SQL function.Defines the enumerated values "LEADING", "TRAILING", "BOTH".
SqlLibraryOperatorTableFactory.getOperatorTable(SqlLibrary...)
instead, passingSqlLibrary.ORACLE
as argument.