public class SqlGroupedWindowFunction extends SqlFunction
Grouped window functions always occur in the GROUP BY clause. They often
have auxiliary functions that access information about the group. For
example, HOP is a group function, and its auxiliary functions are
HOP_START and HOP_END. Here they are used in a streaming
query:
SELECT STREAM HOP_START(rowtime, INTERVAL '1' HOUR), HOP_END(rowtime, INTERVAL '1' HOUR), MIN(unitPrice) FROM Orders GROUP BY HOP(rowtime, INTERVAL '1' HOUR), productId
| Modifier and Type | Field and Description |
|---|---|
SqlGroupedWindowFunction |
groupFunction
The grouped function, if this an auxiliary function; null otherwise.
|
kind, MDX_PRECEDENCE, NL| Constructor and Description |
|---|
SqlGroupedWindowFunction(SqlKind kind,
SqlGroupedWindowFunction groupFunction,
SqlOperandTypeChecker operandTypeChecker)
Deprecated.
|
SqlGroupedWindowFunction(String name,
SqlKind kind,
SqlGroupedWindowFunction groupFunction,
SqlOperandTypeChecker operandTypeChecker)
Deprecated.
|
SqlGroupedWindowFunction(String name,
SqlKind kind,
SqlGroupedWindowFunction groupFunction,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker,
SqlFunctionCategory category)
Creates a SqlGroupedWindowFunction.
|
| Modifier and Type | Method and Description |
|---|---|
SqlGroupedWindowFunction |
auxiliary(SqlKind kind)
Creates an auxiliary function from this grouped window function.
|
SqlGroupedWindowFunction |
auxiliary(String name,
SqlKind kind)
Creates an auxiliary function from this grouped window function.
|
List<SqlGroupedWindowFunction> |
getAuxiliaryFunctions()
Returns a list of this grouped window function's auxiliary functions.
|
SqlMonotonicity |
getMonotonicity(SqlOperatorBinding call)
Returns whether a call to this operator is monotonic.
|
boolean |
isGroup()
Returns whether this is a group function.
|
boolean |
isGroupAuxiliary()
Returns whether this is an group auxiliary function.
|
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifieracceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, needsSpace, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperandspublic final SqlGroupedWindowFunction groupFunction
public SqlGroupedWindowFunction(String name, SqlKind kind, SqlGroupedWindowFunction groupFunction, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory category)
name - Function namekind - KindgroupFunction - Group function, if this is an auxiliary;
null, if this is a group functionreturnTypeInference - Strategy to use for return type inferenceoperandTypeInference - Strategy to use for parameter type inferenceoperandTypeChecker - Strategy to use for parameter type checkingcategory - Categorization for function@Deprecated public SqlGroupedWindowFunction(String name, SqlKind kind, SqlGroupedWindowFunction groupFunction, SqlOperandTypeChecker operandTypeChecker)
@Deprecated public SqlGroupedWindowFunction(SqlKind kind, SqlGroupedWindowFunction groupFunction, SqlOperandTypeChecker operandTypeChecker)
public SqlGroupedWindowFunction auxiliary(SqlKind kind)
kind - Kind; also determines function namepublic SqlGroupedWindowFunction auxiliary(String name, SqlKind kind)
name - Function namekind - Kindpublic List<SqlGroupedWindowFunction> getAuxiliaryFunctions()
public boolean isGroup()
SqlOperatorGroup functions can only appear in the GROUP BY clause.
Examples are HOP, TUMBLE, SESSION.
Group functions have auxiliary functions, e.g. HOP_START, but
these are not group functions.
isGroup in class SqlOperatorpublic boolean isGroupAuxiliary()
SqlOperatorExamples are HOP_START and HOP_END (both auxiliary to
HOP).
isGroupAuxiliary in class SqlOperatorSqlOperator.isGroup()public SqlMonotonicity getMonotonicity(SqlOperatorBinding call)
SqlOperatorDefault implementation returns SqlMonotonicity.NOT_MONOTONIC.
getMonotonicity in class SqlOperatorcall - Call to this operator with particular arguments and information
about the monotonicity of the argumentsCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.