public class SqlWindowTableFunction extends SqlFunction implements SqlTableFunction
TUMBLE, HOP and SESSION.| Modifier and Type | Class and Description |
|---|---|
protected static class |
SqlWindowTableFunction.AbstractOperandMetadata
Partial implementation of operand type checker.
|
| Modifier and Type | Field and Description |
|---|---|
static SqlReturnTypeInference |
ARG0_TABLE_FUNCTION_WINDOWING
Type-inference strategy whereby the row type of a table function call is a
ROW, which is combined from the row type of operand #0 (which is a TABLE)
and two additional fields.
|
protected static String |
PARAM_DATA
The data source which the table function computes with.
|
protected static String |
PARAM_KEY
The session key(s), only used for SESSION window.
|
protected static String |
PARAM_OFFSET
The optional align offset for each window.
|
protected static String |
PARAM_SIZE
The window duration INTERVAL.
|
protected static String |
PARAM_SLIDE
The slide interval, only used for HOP window.
|
protected static String |
PARAM_TIMECOL
The time attribute column.
|
kind, MDX_PRECEDENCE, NL| Constructor and Description |
|---|
SqlWindowTableFunction(String name,
SqlOperandMetadata operandMetadata)
Creates a window table function with a given name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
argumentMustBeScalar(int ordinal)
Returns whether the
ordinalth argument to this operator must
be scalar (as opposed to a query). |
SqlOperandMetadata |
getOperandTypeChecker() |
SqlReturnTypeInference |
getRowTypeInference()
Returns the record type of the table yielded by this function when
applied to given arguments.
|
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifieracceptCall, acceptCall, adjustType, allowsFraming, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getOperandCountRange, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperandsprotected static final String PARAM_DATA
protected static final String PARAM_TIMECOL
protected static final String PARAM_SIZE
protected static final String PARAM_OFFSET
protected static final String PARAM_KEY
protected static final String PARAM_SLIDE
public static final SqlReturnTypeInference ARG0_TABLE_FUNCTION_WINDOWING
window_start: TIMESTAMP type to indicate a window's start
window_end: TIMESTAMP type to indicate a window's end
public SqlWindowTableFunction(String name, SqlOperandMetadata operandMetadata)
public SqlOperandMetadata getOperandTypeChecker()
getOperandTypeChecker in class SqlOperatorpublic SqlReturnTypeInference getRowTypeInference()
SqlTableFunctiongetRowTypeInference in interface SqlTableFunctionpublic boolean argumentMustBeScalar(int ordinal)
ordinalth argument to this operator must
be scalar (as opposed to a query).
If true (the default), the validator will attempt to convert the argument into a scalar sub-query, which must have one column and return at most one row.
Operators such as SELECT and EXISTS override
this method.
Overrides because the first parameter of table-value function windowing is an explicit TABLE parameter, which is not scalar.
argumentMustBeScalar in class SqlOperatorCopyright © 2012-2020 Apache Software Foundation. All Rights Reserved.