Package org.apache.calcite.sql.fun
Class SqlCountAggFunction
- java.lang.Object
-
- org.apache.calcite.sql.SqlOperator
-
- org.apache.calcite.sql.SqlFunction
-
- org.apache.calcite.sql.SqlAggFunction
-
- org.apache.calcite.sql.fun.SqlCountAggFunction
-
- Direct Known Subclasses:
SqlRegrCountAggFunction
public class SqlCountAggFunction extends SqlAggFunction
Definition of the SQLCOUNT
aggregation function.COUNT
is an aggregator which returns the number of rows which have gone into it. With one argument (or more), it returns the number of rows for which that argument (or all) is notnull
.
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
-
Constructor Summary
Constructors Constructor Description SqlCountAggFunction(java.lang.String name)
SqlCountAggFunction(java.lang.String name, SqlOperandTypeChecker sqlOperandTypeChecker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RelDataType
deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
Derives the type of a call to this operator.java.util.List<RelDataType>
getParameterTypes(RelDataTypeFactory typeFactory)
RelDataType
getReturnType(RelDataTypeFactory typeFactory)
SqlSyntax
getSyntax()
Returns the syntactic type of this operator, never null.<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
getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, 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
-
-
-
-
Constructor Detail
-
SqlCountAggFunction
public SqlCountAggFunction(java.lang.String name)
-
SqlCountAggFunction
public SqlCountAggFunction(java.lang.String name, SqlOperandTypeChecker sqlOperandTypeChecker)
-
-
Method Detail
-
getSyntax
public SqlSyntax getSyntax()
Description copied from class:SqlOperator
Returns the syntactic type of this operator, never null.- Overrides:
getSyntax
in classSqlFunction
-
getParameterTypes
public java.util.List<RelDataType> getParameterTypes(RelDataTypeFactory typeFactory)
- Overrides:
getParameterTypes
in classSqlAggFunction
-
getReturnType
public RelDataType getReturnType(RelDataTypeFactory typeFactory)
- Overrides:
getReturnType
in classSqlAggFunction
-
deriveType
public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
Description copied from class:SqlOperator
Derives the type of a call to this operator.This method is an intrinsic part of the validation process so, unlike
SqlOperator.inferReturnType(org.apache.calcite.sql.SqlOperatorBinding)
, specific operators would not typically override this method.- Overrides:
deriveType
in classSqlFunction
- Parameters:
validator
- Validatorscope
- Scope of validationcall
- Call to this operator- Returns:
- Type of call
-
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
-
-