org.eigenbase.sql.fun
Class SqlStdOperatorTable

java.lang.Object
  extended by org.eigenbase.sql.util.ReflectiveSqlOperatorTable
      extended by org.eigenbase.sql.fun.SqlStdOperatorTable
All Implemented Interfaces:
SqlOperatorTable
Direct Known Subclasses:
FarragoRngOperatorTable, LucidDbOperatorTable

public class SqlStdOperatorTable
extends ReflectiveSqlOperatorTable

Implementation of SqlOperatorTable containing the standard operators and functions.

Since:
May 28, 2004
Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/fun/SqlStdOperatorTable.java#61 $
Author:
jhyde

Field Summary
static SqlFunction absFunc
           
static SqlBinaryOperator andOperator
          Logical AND operator.
static SqlAsOperator asOperator
          AS operator associates an expression in the SELECT clause with an alias.
static SqlAggFunction avgOperator
          AVG aggregate function.
static SqlBetweenOperator betweenOperator
           
static SqlFunction cardinalityFunc
          The CARDINALITY operator, used to retrieve the number of elements in a MULTISET
static SqlCaseOperator caseOperator
           
static SqlFunction castFunc
          The SQL CAST operator.
static SqlFunction ceilFunc
          The CEIL function.
static SqlFunction characterLengthFunc
           
static SqlFunction charLengthFunc
           
static SqlFunction coalesceFunc
          The COALESCE builtin function.
static SqlFunction collectFunc
          The COLLECT operator.
static SqlSpecialOperator collectionTableOperator
          The "table function derived table" operator, which a table-valued function into a relation, e.g.
static SqlColumnListConstructor columnListConstructor
          The COLUMN_LIST constructor.
static SqlBinaryOperator concatOperator
          String concatenation operator, '||'.
static SqlFunction convertFunc
           
static SqlAggFunction countOperator
          COUNT aggregate function.
static SqlRankFunction cumeDistFunc
          CUME_DIST Window function.
static SqlFunction currentCatalogFunc
          The CURRENT_CATALOG function.
static SqlFunction currentDateFunc
          The CURRENT_DATE function.
static SqlFunction currentPathFunc
          The CURRENT_PATH function.
static SqlFunction currentRoleFunc
          The CURRENT_ROLE function.
static SqlFunction currentSchemaFunc
          The CURRENT_SCHEMA function.
static SqlFunction currentTimeFunc
          The CURRENT_TIME [(precision)] function.
static SqlFunction currentTimestampFunc
          The CURRENT_TIMESTAMP [(precision)] function.
static SqlFunction currentUserFunc
          The CURRENT_USER function.
static SqlCursorConstructor cursorConstructor
          The CURSOR constructor.
static SqlSpecialOperator deleteOperator
           
static SqlRankFunction denseRankFunc
          DENSE_RANK Window function.
static SqlPostfixOperator descendingOperator
           
static SqlBinaryOperator divideIntegerOperator
          Internal integer arithmetic division operator, '/INT'.
static SqlBinaryOperator divideOperator
          Arithmetic division operator, '/'.
static SqlBinaryOperator dotOperator
          Dot operator, '.', used for referencing fields of records.
static SqlFunction elementFunc
          The ELEMENT operator, used to convert a multiset with only one item to a "regular" type.
static SqlInternalOperator elementSlicefunc
          The internal "$ELEMENT_SLICE" operator returns the first field of the only element of a multiset.
static SqlBinaryOperator equalsOperator
          Logical equals operator, '='.
static SqlSpecialOperator escapeOperator
          Internal operator used to represent the ESCAPE clause of a LIKE or SIMILAR TO expression.
static SqlSetOperator exceptAllOperator
           
static SqlSetOperator exceptOperator
           
static SqlPrefixOperator existsOperator
           
static SqlFunction expFunc
           
static SqlSpecialOperator explainOperator
           
static SqlPrefixOperator explicitTableOperator
          Keyword which allows an identifier to be explicitly flagged as a table.
static SqlFunction extractFunc
          The SQL EXTRACT operator.
static SqlAggFunction firstValueOperator
          FIRST_VALUE aggregate function.
static SqlFunction floorFunc
          The FLOOR function.
static SqlFunction fusionFunc
          The FUSION operator.
static SqlBinaryOperator greaterThanOperator
          Logical greater-than operator, '>'.
static SqlBinaryOperator greaterThanOrEqualOperator
          Logical greater-than-or-equal operator, '>='.
static SqlAggFunction histogramAggFunction
          HISTORAM aggregate function support.
static SqlFunction histogramFirstValueFunction
          HISTOGRAM_FIRST_VALUE window aggregate function.
static SqlFunction histogramLastValueFunction
          HISTOGRAM_LAST_VALUE window aggregate function.
static SqlFunction histogramMaxFunction
          HISTOGRAM_MAX window aggregate function.
static SqlFunction histogramMinFunction
          HISTOGRAM_MIN window aggregate function.
static SqlFunction initcapFunc
           
static SqlBinaryOperator inOperator
          IN operator tests for a value's membership in a subquery or a list of values.
static SqlSpecialOperator insertOperator
           
private static SqlStdOperatorTable instance
          The standard operator table.
static SqlSetOperator intersectAllOperator
           
static SqlSetOperator intersectOperator
           
static SqlPostfixOperator isASetOperator
           
static SqlBinaryOperator isDifferentFromOperator
          The internal $IS_DIFFERENT_FROM operator is the same as the user-level isDistinctFromOperator in all respects except that the test for equality on character datatypes treats trailing spaces as significant.
static SqlBinaryOperator isDistinctFromOperator
          IS DISTINCT FROM operator.
static SqlPostfixOperator isFalseOperator
           
static SqlBinaryOperator isNotDistinctFromOperator
          IS NOT DISTINCT FROM operator.
static SqlPostfixOperator isNotFalseOperator
           
static SqlPostfixOperator isNotNullOperator
           
static SqlPostfixOperator isNotTrueOperator
           
static SqlPostfixOperator isNotUnknownOperator
           
static SqlPostfixOperator isNullOperator
           
static SqlPostfixOperator isTrueOperator
           
static SqlPostfixOperator isUnknownOperator
           
static SqlJoinOperator joinOperator
           
static SqlAggFunction lastValueOperator
          LAST_VALUE aggregate function.
static SqlSpecialOperator lateralOperator
          The LATERALoperator.
static SqlBinaryOperator lessThanOperator
          Logical less-than operator, '<'.
static SqlBinaryOperator lessThanOrEqualOperator
          Logical less-than-or-equal operator, '<='.
static SqlSpecialOperator likeOperator
           
static SqlLiteralChainOperator literalChainOperator
           
static SqlFunction lnFunc
           
static SqlFunction localTimeFunc
          The LOCALTIME [(precision)] function.
static SqlFunction localTimestampFunc
          The LOCALTIMESTAMP [(precision)] function.
static SqlFunction log10Func
           
static SqlFunction lowerFunc
           
static SqlAggFunction maxOperator
          MAX aggregate function.
static SqlBinaryOperator memberOfOperator
          Multiset MEMBER OF.
static SqlSpecialOperator mergeOperator
           
static SqlAggFunction minOperator
          MIN aggregate function.
static SqlOperator minusDateOperator
          A special operator for the subtraction of two DATETIMEs.
static SqlBinaryOperator minusOperator
          Infix arithmetic minus operator, '-'.
static SqlFunction modFunc
           
static SqlBinaryOperator multiplyOperator
          Arithmetic multiplication operator, '*'.
static SqlMultisetSetOperator multisetExceptAllOperator
          The "MULTISET EXCEPT ALL" operator.
static SqlMultisetSetOperator multisetExceptOperator
          The "MULTISET EXCEPT" operator.
static SqlMultisetSetOperator multisetIntersectAllOperator
          The "MULTISET INTERSECT ALL" operator.
static SqlMultisetSetOperator multisetIntersectOperator
          The "MULTISET INTERSECT" operator.
static SqlMultisetQueryConstructor multisetQueryConstructor
          The MULTISET Query Constructor.
static SqlMultisetSetOperator multisetUnionAllOperator
          The "MULTISET UNION ALL" operator.
static SqlMultisetSetOperator multisetUnionOperator
          The "MULTISET UNION" operator.
static SqlMultisetValueConstructor multisetValueConstructor
          The MULTISET Value Constructor.
static SqlOperator newOperator
           
static SqlFunction nextValueFunc
          The sequence next value function: NEXT VALUE FOR sequence
static SqlBetweenOperator notBetweenOperator
           
static SqlBinaryOperator notEqualsOperator
          Logical not-equals operator, '<>'.
static SqlBinaryOperator notInOperator
          NOT IN operator tests for a value's membership in a subquery or a list of values.
static SqlSpecialOperator notLikeOperator
           
static SqlPrefixOperator notOperator
           
static SqlSpecialOperator notSimilarOperator
           
static SqlFunction nullIfFunc
           
static SqlOrderByOperator orderByOperator
           
static SqlBinaryOperator orOperator
          Logical OR operator.
static SqlOverlapsOperator overlapsOperator
           
static SqlFunction overlayFunc
           
static SqlBinaryOperator overOperator
          The OVER operator, which applies an aggregate functions to a window.
static SqlRankFunction percentRankFunc
          PERCENT_RANK Window function.
static SqlBinaryOperator plusOperator
          Infix arithmetic plus operator, '+'.
static SqlFunction positionFunc
           
static SqlFunction powerFunc
          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 SqlPrefixOperator prefixMinusOperator
          Prefix arithmetic minus operator, '-'.
static SqlPrefixOperator prefixPlusOperator
          Prefix arithmetic plus operator, '+'.
static SqlOperator procedureCallOperator
           
static SqlRankFunction rankFunc
          RANK Window function.
static SqlSpecialOperator reinterpretOperator
          An REINTERPREToperator is internal to the planner.
static SqlRowOperator rowConstructor
           
static SqlRankFunction rowNumberFunc
          ROW_NUMBER Window function.
static SqlSpecialOperator sampleFunction
          The TABLESAMPLE operator.
static SqlInternalOperator scalarQueryOperator
          The internal "$SCALAR_QUERY" operator returns a scalar value from a record type.
static SqlSelectOperator selectOperator
          The standard SELECT operator.
static SqlFunction sessionUserFunc
          The SESSION_USER function.
static SqlSpecialOperator similarOperator
           
static SqlAggFunction singleValueOperator
          SINGLE_VALUE aggregate function.
static SqlInternalOperator sliceOp
          The internal "$SLICE" operator takes a multiset of records and returns a multiset of the first column of those records.
static SqlBinaryOperator submultisetOfOperator
          Submultiset.
static SqlFunction substringFunc
          The character substring function: SUBSTRING(string FROM start [FOR length]).
static SqlAggFunction sumEmptyIsZeroOperator
          SUM0 aggregate function.
static SqlAggFunction sumOperator
          SUM aggregate function.
static SqlBetweenOperator symmetricBetweenOperator
           
static SqlBetweenOperator symmetricNotBetweenOperator
           
static SqlFunction systemUserFunc
          The SYSTEM_USER function.
static SqlInternalOperator throwOperator
           
static SqlFunction translateFunc
           
static SqlFunction trimFunc
          The "TRIM" function.
static SqlSetOperator unionAllOperator
           
static SqlSetOperator unionOperator
           
static SqlSpecialOperator unnestOperator
          The UNNESToperator.
static SqlSpecialOperator updateOperator
           
static SqlFunction upperFunc
           
static SqlFunction userFunc
          The USER function.
static SqlSpecialOperator valuesOperator
           
static SqlWindowOperator windowOperator
          The WINDOW clause of a SELECT statment.
 
Constructor Summary
SqlStdOperatorTable()
           
 
Method Summary
static SqlStdOperatorTable instance()
          Returns the standard operator table, creating it if necessary.
 
Methods inherited from class org.eigenbase.sql.util.ReflectiveSqlOperatorTable
getOperatorList, init, lookupOperatorOverloads, register, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static SqlStdOperatorTable instance
The standard operator table.


unionOperator

public static final SqlSetOperator unionOperator

unionAllOperator

public static final SqlSetOperator unionAllOperator

exceptOperator

public static final SqlSetOperator exceptOperator

exceptAllOperator

public static final SqlSetOperator exceptAllOperator

intersectOperator

public static final SqlSetOperator intersectOperator

intersectAllOperator

public static final SqlSetOperator intersectAllOperator

multisetUnionOperator

public static final SqlMultisetSetOperator multisetUnionOperator
The "MULTISET UNION" operator.


multisetUnionAllOperator

public static final SqlMultisetSetOperator multisetUnionAllOperator
The "MULTISET UNION ALL" operator.


multisetExceptOperator

public static final SqlMultisetSetOperator multisetExceptOperator
The "MULTISET EXCEPT" operator.


multisetExceptAllOperator

public static final SqlMultisetSetOperator multisetExceptAllOperator
The "MULTISET EXCEPT ALL" operator.


multisetIntersectOperator

public static final SqlMultisetSetOperator multisetIntersectOperator
The "MULTISET INTERSECT" operator.


multisetIntersectAllOperator

public static final SqlMultisetSetOperator multisetIntersectAllOperator
The "MULTISET INTERSECT ALL" operator.


andOperator

public static final SqlBinaryOperator andOperator
Logical AND operator.


asOperator

public static final SqlAsOperator asOperator
AS operator associates an expression in the SELECT clause with an alias.


concatOperator

public static final SqlBinaryOperator concatOperator
String concatenation operator, '||'.


divideOperator

public static final SqlBinaryOperator divideOperator
Arithmetic division operator, '/'.


divideIntegerOperator

public static final SqlBinaryOperator divideIntegerOperator
Internal integer arithmetic division operator, '/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.


dotOperator

public static final SqlBinaryOperator dotOperator
Dot operator, '.', used for referencing fields of records.


equalsOperator

public static final SqlBinaryOperator equalsOperator
Logical equals operator, '='.


greaterThanOperator

public static final SqlBinaryOperator greaterThanOperator
Logical greater-than operator, '>'.


isDistinctFromOperator

public static final SqlBinaryOperator isDistinctFromOperator
IS DISTINCT FROM operator.


isNotDistinctFromOperator

public static final SqlBinaryOperator isNotDistinctFromOperator
IS NOT DISTINCT FROM operator. Is equivalent to NOT(x IS DISTINCT FROM y)


isDifferentFromOperator

public static final SqlBinaryOperator isDifferentFromOperator
The internal $IS_DIFFERENT_FROM operator is the same as the user-level isDistinctFromOperator in all respects except that the test for equality on character datatypes treats trailing spaces as significant.


greaterThanOrEqualOperator

public static final SqlBinaryOperator greaterThanOrEqualOperator
Logical greater-than-or-equal operator, '>='.


inOperator

public static final SqlBinaryOperator inOperator
IN operator tests for a value's membership in a subquery or a list of values.


notInOperator

public static final SqlBinaryOperator notInOperator
NOT IN operator tests for a value's membership in a subquery or a list of values.


lessThanOperator

public static final SqlBinaryOperator lessThanOperator
Logical less-than operator, '<'.


lessThanOrEqualOperator

public static final SqlBinaryOperator lessThanOrEqualOperator
Logical less-than-or-equal operator, '<='.


minusOperator

public static final SqlBinaryOperator minusOperator
Infix arithmetic minus operator, '-'.

Its precedence is less than the prefix + and - operators.


multiplyOperator

public static final SqlBinaryOperator multiplyOperator
Arithmetic multiplication operator, '*'.


notEqualsOperator

public static final SqlBinaryOperator notEqualsOperator
Logical not-equals operator, '<>'.


orOperator

public static final SqlBinaryOperator orOperator
Logical OR operator.


plusOperator

public static final SqlBinaryOperator plusOperator
Infix arithmetic plus operator, '+'.


memberOfOperator

public static final SqlBinaryOperator memberOfOperator
Multiset MEMBER OF. Checks to see if a element belongs to a multiset.
Example:
'green' MEMBER OF MULTISET['red','almost green','blue'] returns false.


submultisetOfOperator

public static final SqlBinaryOperator submultisetOfOperator
Submultiset. Checks to see if an multiset is a sub-set of another multiset.
Example:
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)


descendingOperator

public static final SqlPostfixOperator descendingOperator

isNotNullOperator

public static final SqlPostfixOperator isNotNullOperator

isNullOperator

public static final SqlPostfixOperator isNullOperator

isNotTrueOperator

public static final SqlPostfixOperator isNotTrueOperator

isTrueOperator

public static final SqlPostfixOperator isTrueOperator

isNotFalseOperator

public static final SqlPostfixOperator isNotFalseOperator

isFalseOperator

public static final SqlPostfixOperator isFalseOperator

isNotUnknownOperator

public static final SqlPostfixOperator isNotUnknownOperator

isUnknownOperator

public static final SqlPostfixOperator isUnknownOperator

isASetOperator

public static final SqlPostfixOperator isASetOperator

existsOperator

public static final SqlPrefixOperator existsOperator

notOperator

public static final SqlPrefixOperator notOperator

prefixMinusOperator

public static final SqlPrefixOperator prefixMinusOperator
Prefix arithmetic minus operator, '-'.

Its precedence is greater than the infix '+' and '-' operators.


prefixPlusOperator

public static final SqlPrefixOperator prefixPlusOperator
Prefix arithmetic plus operator, '+'.

Its precedence is greater than the infix '+' and '-' operators.


explicitTableOperator

public static final SqlPrefixOperator explicitTableOperator
Keyword which allows an identifier to be explicitly flagged as a table. For example, select * from (TABLE t) or TABLE t. See also collectionTableOperator.


sumOperator

public static final SqlAggFunction sumOperator
SUM aggregate function.


countOperator

public static final SqlAggFunction countOperator
COUNT aggregate function.


minOperator

public static final SqlAggFunction minOperator
MIN aggregate function.


maxOperator

public static final SqlAggFunction maxOperator
MAX aggregate function.


lastValueOperator

public static final SqlAggFunction lastValueOperator
LAST_VALUE aggregate function.


firstValueOperator

public static final SqlAggFunction firstValueOperator
FIRST_VALUE aggregate function.


singleValueOperator

public static final SqlAggFunction singleValueOperator
SINGLE_VALUE aggregate function.


avgOperator

public static final SqlAggFunction avgOperator
AVG aggregate function.


histogramAggFunction

public static final SqlAggFunction histogramAggFunction
HISTORAM aggregate function support. Used by window aggregate versions of MIN/MAX


histogramMinFunction

public static final SqlFunction histogramMinFunction
HISTOGRAM_MIN window aggregate function.


histogramMaxFunction

public static final SqlFunction histogramMaxFunction
HISTOGRAM_MAX window aggregate function.


histogramFirstValueFunction

public static final SqlFunction histogramFirstValueFunction
HISTOGRAM_FIRST_VALUE window aggregate function.


histogramLastValueFunction

public static final SqlFunction histogramLastValueFunction
HISTOGRAM_LAST_VALUE window aggregate function.


sumEmptyIsZeroOperator

public static final SqlAggFunction sumEmptyIsZeroOperator
SUM0 aggregate function.


cumeDistFunc

public static final SqlRankFunction cumeDistFunc
CUME_DIST Window function.


denseRankFunc

public static final SqlRankFunction denseRankFunc
DENSE_RANK Window function.


percentRankFunc

public static final SqlRankFunction percentRankFunc
PERCENT_RANK Window function.


rankFunc

public static final SqlRankFunction rankFunc
RANK Window function.


rowNumberFunc

public static final SqlRankFunction rowNumberFunc
ROW_NUMBER Window function.


rowConstructor

public static final SqlRowOperator rowConstructor

minusDateOperator

public static final SqlOperator minusDateOperator
A special operator for the subtraction of two DATETIMEs. The format of DATETIME substraction is:
"(" <datetime> "-" <datetime> ")" . This operator is special since it needs to hold the additional interval qualifier specification.


multisetValueConstructor

public static final SqlMultisetValueConstructor multisetValueConstructor
The MULTISET Value Constructor. e.g. "MULTISET[1,2,3]".


multisetQueryConstructor

public static final SqlMultisetQueryConstructor multisetQueryConstructor
The MULTISET Query Constructor. e.g. "SELECT dname, MULTISET(SELECT FROM emp WHERE deptno = dept.deptno) FROM dept".


cursorConstructor

public static final SqlCursorConstructor cursorConstructor
The CURSOR constructor. e.g. "SELECT * FROM TABLE(DEDUP(CURSOR(SELECT * FROM EMPS), 'name'))".


columnListConstructor

public static final SqlColumnListConstructor columnListConstructor
The COLUMN_LIST constructor. e.g. the ROW() call in "SELECT * FROM TABLE(DEDUP(CURSOR(SELECT * FROM EMPS), ROW(name, empno)))".


unnestOperator

public static final SqlSpecialOperator unnestOperator
The UNNESToperator.


lateralOperator

public static final SqlSpecialOperator lateralOperator
The LATERALoperator.


collectionTableOperator

public static final SqlSpecialOperator collectionTableOperator
The "table function derived table" operator, which a table-valued function into a relation, e.g. "SELECT * FROM TABLE(ramp(5))".

This operator has function syntax (with one argument), whereas explicitTableOperator is a prefix operator.


overlapsOperator

public static final SqlOverlapsOperator overlapsOperator

valuesOperator

public static final SqlSpecialOperator valuesOperator

literalChainOperator

public static final SqlLiteralChainOperator literalChainOperator

throwOperator

public static final SqlInternalOperator throwOperator

betweenOperator

public static final SqlBetweenOperator betweenOperator

symmetricBetweenOperator

public static final SqlBetweenOperator symmetricBetweenOperator

notBetweenOperator

public static final SqlBetweenOperator notBetweenOperator

symmetricNotBetweenOperator

public static final SqlBetweenOperator symmetricNotBetweenOperator

notLikeOperator

public static final SqlSpecialOperator notLikeOperator

likeOperator

public static final SqlSpecialOperator likeOperator

notSimilarOperator

public static final SqlSpecialOperator notSimilarOperator

similarOperator

public static final SqlSpecialOperator similarOperator

escapeOperator

public static final SqlSpecialOperator escapeOperator
Internal operator used to represent the ESCAPE clause of a LIKE or SIMILAR TO expression.


selectOperator

public static final SqlSelectOperator selectOperator
The standard SELECT operator.


caseOperator

public static final SqlCaseOperator caseOperator

joinOperator

public static final SqlJoinOperator joinOperator

insertOperator

public static final SqlSpecialOperator insertOperator

deleteOperator

public static final SqlSpecialOperator deleteOperator

updateOperator

public static final SqlSpecialOperator updateOperator

mergeOperator

public static final SqlSpecialOperator mergeOperator

explainOperator

public static final SqlSpecialOperator explainOperator

orderByOperator

public static final SqlOrderByOperator orderByOperator

procedureCallOperator

public static final SqlOperator procedureCallOperator

newOperator

public static final SqlOperator newOperator

windowOperator

public static final SqlWindowOperator windowOperator
The WINDOW clause of a SELECT statment.

See Also:
overOperator

overOperator

public static final SqlBinaryOperator overOperator
The OVER operator, which applies an aggregate functions to a window.

Operands are as follows:

  1. name of window function (SqlCall)
  2. window name (SqlLiteral) or window in-line specification (@link SqlWindowOperator})

reinterpretOperator

public static final SqlSpecialOperator reinterpretOperator
An REINTERPREToperator 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.


substringFunc

public static final SqlFunction substringFunc
The character substring function: 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.


convertFunc

public static final SqlFunction convertFunc

translateFunc

public static final SqlFunction translateFunc

overlayFunc

public static final SqlFunction overlayFunc

trimFunc

public static final SqlFunction trimFunc
The "TRIM" function.


positionFunc

public static final SqlFunction positionFunc

charLengthFunc

public static final SqlFunction charLengthFunc

characterLengthFunc

public static final SqlFunction characterLengthFunc

upperFunc

public static final SqlFunction upperFunc

lowerFunc

public static final SqlFunction lowerFunc

initcapFunc

public static final SqlFunction initcapFunc

powerFunc

public static final SqlFunction powerFunc
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. For example POW(int, int) can return a non integer if the second operand is negative.


modFunc

public static final SqlFunction modFunc

lnFunc

public static final SqlFunction lnFunc

log10Func

public static final SqlFunction log10Func

absFunc

public static final SqlFunction absFunc

expFunc

public static final SqlFunction expFunc

nullIfFunc

public static final SqlFunction nullIfFunc

coalesceFunc

public static final SqlFunction coalesceFunc
The COALESCE builtin function.


floorFunc

public static final SqlFunction floorFunc
The FLOOR function.


ceilFunc

public static final SqlFunction ceilFunc
The CEIL function.


userFunc

public static final SqlFunction userFunc
The USER function.


currentUserFunc

public static final SqlFunction currentUserFunc
The CURRENT_USER function.


sessionUserFunc

public static final SqlFunction sessionUserFunc
The SESSION_USER function.


systemUserFunc

public static final SqlFunction systemUserFunc
The SYSTEM_USER function.


currentPathFunc

public static final SqlFunction currentPathFunc
The CURRENT_PATH function.


currentRoleFunc

public static final SqlFunction currentRoleFunc
The CURRENT_ROLE function.


currentCatalogFunc

public static final SqlFunction currentCatalogFunc
The CURRENT_CATALOG function.


currentSchemaFunc

public static final SqlFunction currentSchemaFunc
The CURRENT_SCHEMA function.


localTimeFunc

public static final SqlFunction localTimeFunc
The LOCALTIME [(precision)] function.


localTimestampFunc

public static final SqlFunction localTimestampFunc
The LOCALTIMESTAMP [(precision)] function.


currentTimeFunc

public static final SqlFunction currentTimeFunc
The CURRENT_TIME [(precision)] function.


currentTimestampFunc

public static final SqlFunction currentTimestampFunc
The CURRENT_TIMESTAMP [(precision)] function.


currentDateFunc

public static final SqlFunction currentDateFunc
The CURRENT_DATE function.


castFunc

public static final SqlFunction castFunc
The SQL 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.


extractFunc

public static final SqlFunction extractFunc
The SQL EXTRACT operator. Extracts a specified field value from a DATETIME or an INTERVAL. E.g.
EXTRACT(HOUR FROM INTERVAL '364 23:59:59') returns 23


elementFunc

public static final SqlFunction elementFunc
The ELEMENT operator, used to convert a multiset with only one item to a "regular" type. Example ... log(ELEMENT(MULTISET[1])) ...


sliceOp

public static final SqlInternalOperator sliceOp
The internal "$SLICE" operator takes a multiset of records and returns a multiset of the first column of those records.

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.


elementSlicefunc

public static final SqlInternalOperator elementSlicefunc
The internal "$ELEMENT_SLICE" operator returns the first field of the only element of a multiset.

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!


scalarQueryOperator

public static final SqlInternalOperator scalarQueryOperator
The internal "$SCALAR_QUERY" operator returns a scalar value from a record type. It asusmes the record type only has one field, and returns that field as the output.


cardinalityFunc

public static final SqlFunction cardinalityFunc
The CARDINALITY operator, used to retrieve the number of elements in a MULTISET


collectFunc

public static final SqlFunction collectFunc
The COLLECT operator. Multiset aggregator function.


fusionFunc

public static final SqlFunction fusionFunc
The FUSION operator. Multiset aggregator function.


nextValueFunc

public static final SqlFunction nextValueFunc
The sequence next value function: NEXT VALUE FOR sequence


sampleFunction

public static final SqlSpecialOperator sampleFunction
The 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.

Constructor Detail

SqlStdOperatorTable

public SqlStdOperatorTable()
Method Detail

instance

public static SqlStdOperatorTable instance()
Returns the standard operator table, creating it if necessary.