public class HiveSqlSumEmptyIsZeroAggFunction
extends org.apache.calcite.sql.SqlAggFunction
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
.Constructor and Description |
---|
HiveSqlSumEmptyIsZeroAggFunction(boolean isDistinct,
org.apache.calcite.sql.type.SqlReturnTypeInference returnTypeInference,
org.apache.calcite.sql.type.SqlOperandTypeInference operandTypeInference,
org.apache.calcite.sql.type.SqlOperandTypeChecker operandTypeChecker) |
Modifier and Type | Method and Description |
---|---|
List<org.apache.calcite.rel.type.RelDataType> |
getParameterTypes(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) |
org.apache.calcite.rel.type.RelDataType |
getReturnType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) |
<T> T |
unwrap(Class<T> clazz) |
allowsFilter, isAggregator, isQuantifierAllowed, requiresOrder, requiresOver, validateCall
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, unparse, validateQuantifier
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
public HiveSqlSumEmptyIsZeroAggFunction(boolean isDistinct, org.apache.calcite.sql.type.SqlReturnTypeInference returnTypeInference, org.apache.calcite.sql.type.SqlOperandTypeInference operandTypeInference, org.apache.calcite.sql.type.SqlOperandTypeChecker operandTypeChecker)
public List<org.apache.calcite.rel.type.RelDataType> getParameterTypes(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
getParameterTypes
in class org.apache.calcite.sql.SqlAggFunction
public org.apache.calcite.rel.type.RelDataType getReturnType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
getReturnType
in class org.apache.calcite.sql.SqlAggFunction
public <T> T unwrap(Class<T> clazz)
unwrap
in interface org.apache.calcite.schema.Wrapper
unwrap
in class org.apache.calcite.sql.SqlAggFunction
Copyright © 2022 The Apache Software Foundation. All rights reserved.