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
-
public class SqlSumEmptyIsZeroAggFunction extends SqlAggFunction
Sum0
is an aggregator which returns the sum of the values which go into it likeSum
. It differs in that when no non null values are applied zero is returned instead of null. Can be used along withCount
to implementSum
.
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
-
Constructor Summary
Constructors Constructor Description SqlSumEmptyIsZeroAggFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<RelDataType>
getParameterTypes(RelDataTypeFactory typeFactory)
RelDataType
getReturnType(RelDataTypeFactory typeFactory)
<T> T
unwrap(java.lang.Class<T> clazz)
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, isAggregator, 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, 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, validRexOperands
-
-
-
-
Method Detail
-
getParameterTypes
public java.util.List<RelDataType> getParameterTypes(RelDataTypeFactory typeFactory)
- Overrides:
getParameterTypes
in classSqlAggFunction
-
getReturnType
public RelDataType getReturnType(RelDataTypeFactory typeFactory)
- Overrides:
getReturnType
in classSqlAggFunction
-
unwrap
public <T> T unwrap(java.lang.Class<T> clazz)
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
-
-