Package org.apache.calcite.sql.fun
Class SqlAbstractGroupFunction
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlFunction
org.apache.calcite.sql.SqlAggFunction
org.apache.calcite.sql.fun.SqlAbstractGroupFunction
Base class for grouping functions 
GROUP_ID, GROUPING_ID,
 GROUPING.- 
Field SummaryFields inherited from class org.apache.calcite.sql.SqlOperatorkind, MDX_PRECEDENCE, NL
- 
Constructor SummaryConstructorsConstructorDescriptionSqlAbstractGroupFunction(String name, SqlKind kind, SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory category) Creates a SqlAbstractGroupFunction.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanWhether this aggregate function allows aFILTER (WHERE ...)clause.booleanReturns whether this function allows aDISTINCTorALLquantifier.voidvalidateCall(SqlCall call, SqlValidator validator, SqlValidatorScope scope, SqlValidatorScope operandScope) Validates a call to this operator.Methods inherited from class org.apache.calcite.sql.SqlAggFunctionallowsNullTreatment, getDistinctOptionality, getParameterTypes, getReturnType, getRollup, isAggregator, isPercentile, requiresGroupOrder, requiresOrder, requiresOver, unwrapMethods inherited from class org.apache.calcite.sql.SqlFunctionderiveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, unparse, validateQuantifierMethods inherited from class org.apache.calcite.sql.SqlOperatoracceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getSqlCallFactory, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperandsMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.schema.WrappermaybeUnwrap, unwrapOrThrow
- 
Constructor Details- 
SqlAbstractGroupFunctionpublic SqlAbstractGroupFunction(String name, SqlKind kind, SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, SqlFunctionCategory category) Creates a SqlAbstractGroupFunction.- Parameters:
- name- Name of builtin function
- kind- kind of operator implemented by function
- returnTypeInference- strategy to use for return type inference
- operandTypeInference- strategy to use for parameter type inference
- operandTypeChecker- strategy to use for parameter type checking
- category- categorization for function
 
 
- 
- 
Method Details- 
validateCallpublic void validateCall(SqlCall call, SqlValidator validator, SqlValidatorScope scope, SqlValidatorScope operandScope) Description copied from class:SqlOperatorValidates a call to this operator.This 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 ofSqlCallnever call this method.- Overrides:
- validateCallin class- SqlAggFunction
- Parameters:
- call- the call to this operator
- validator- the active validator
- scope- validator scope
- operandScope- validator scope in which to validate operands to this call; usually equal to scope, but not always because some operators introduce new scopes
- See Also:
 
- 
isQuantifierAllowedpublic boolean isQuantifierAllowed()Description copied from class:SqlFunctionReturns whether this function allows aDISTINCTorALLquantifier. The default isfalse; some aggregate functions returntrue.- Overrides:
- isQuantifierAllowedin class- SqlAggFunction
 
- 
allowsFilterpublic boolean allowsFilter()Description copied from class:SqlAggFunctionWhether this aggregate function allows aFILTER (WHERE ...)clause.- Overrides:
- allowsFilterin class- SqlAggFunction
 
 
-