public class SqlAbstractGroupFunction extends SqlAggFunction
GROUP_ID, GROUPING_ID,
GROUPING.kind, MDX_PRECEDENCE, NL| Constructor and Description |
|---|
SqlAbstractGroupFunction(String name,
SqlKind kind,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker,
SqlFunctionCategory category)
Creates a SqlAbstractGroupFunction.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsFilter()
Whether this aggregate function allows a
FILTER (WHERE ...)
clause. |
boolean |
isQuantifierAllowed()
Returns whether this function allows a
DISTINCT or
ALL quantifier. |
void |
validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope)
Validates a call to this operator.
|
getParameterTypes, getReturnType, isAggregator, requiresOrder, requiresOver, unwrapderiveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, unparse, validateQuantifieracceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperandspublic SqlAbstractGroupFunction(String name, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory category)
name - Name of builtin functionkind - kind of operator implemented by functionreturnTypeInference - strategy to use for return type inferenceoperandTypeInference - strategy to use for parameter type inferenceoperandTypeChecker - strategy to use for parameter type checkingcategory - categorization for functionpublic void validateCall(SqlCall call, SqlValidator validator, SqlValidatorScope scope, SqlValidatorScope operandScope)
SqlOperatorThis method should not perform type-derivation or perform validation
related related to types. That is done later, by
SqlOperator.deriveType(SqlValidator, SqlValidatorScope, SqlCall). This method
should focus on structural validation.
A typical implementation of this method first validates the operands, then performs some operator-specific logic. The default implementation just validates the operands.
This method is the default implementation of SqlCall.validate(org.apache.calcite.sql.validate.SqlValidator, org.apache.calcite.sql.validate.SqlValidatorScope);
but note that some sub-classes of SqlCall never call this method.
validateCall in class SqlAggFunctioncall - the call to this operatorvalidator - the active validatorscope - validator scopeoperandScope - validator scope in which to validate operands to this
call; usually equal to scope, but not always because
some operators introduce new scopesSqlNode.validateExpr(SqlValidator, SqlValidatorScope),
SqlOperator.deriveType(SqlValidator, SqlValidatorScope, SqlCall)public boolean isQuantifierAllowed()
SqlFunctionDISTINCT or
ALL quantifier. The default is false; some aggregate
functions return true.isQuantifierAllowed in class SqlAggFunctionpublic boolean allowsFilter()
SqlAggFunctionFILTER (WHERE ...)
clause.allowsFilter in class SqlAggFunctionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.