Package org.apache.calcite.sql.fun
Class SqlSumEmptyIsZeroAggFunction
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlFunction
org.apache.calcite.sql.SqlAggFunction
org.apache.calcite.sql.fun.SqlSumEmptyIsZeroAggFunction
Sum0
is an aggregator which returns the sum of the values which
go into it like Sum
. It differs in that when no non null values
are applied zero is returned instead of null. Can be used along with
Count
to implement Sum
.-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetParameterTypes
(RelDataTypeFactory typeFactory) getReturnType
(RelDataTypeFactory typeFactory) Gets rollup aggregation function.<T> @Nullable T
Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.Methods inherited from class org.apache.calcite.sql.SqlAggFunction
allowsFilter, allowsNullTreatment, getDistinctOptionality, isAggregator, isPercentile, isQuantifierAllowed, requiresGroupOrder, requiresOrder, requiresOver, validateCall
Methods inherited from class org.apache.calcite.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, unparse, validateQuantifier
Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, 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, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.schema.Wrapper
maybeUnwrap, unwrapOrThrow
-
Constructor Details
-
SqlSumEmptyIsZeroAggFunction
public SqlSumEmptyIsZeroAggFunction()
-
-
Method Details
-
getParameterTypes
- Overrides:
getParameterTypes
in classSqlAggFunction
-
getReturnType
- Overrides:
getReturnType
in classSqlAggFunction
-
unwrap
Description copied from interface:Wrapper
Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.- Specified by:
unwrap
in interfaceWrapper
- Overrides:
unwrap
in classSqlAggFunction
-
getRollup
Description copied from class:SqlAggFunction
Gets rollup aggregation function.- Overrides:
getRollup
in classSqlAggFunction
-