org.eigenbase.sql.fun
Class SqlCountAggFunction
java.lang.Object
org.eigenbase.sql.SqlOperator
org.eigenbase.sql.SqlFunction
org.eigenbase.sql.SqlAggFunction
org.eigenbase.sql.fun.SqlCountAggFunction
- All Implemented Interfaces:
- Aggregation
public class SqlCountAggFunction
- extends SqlAggFunction
Definition of the SQL COUNT
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 not null
.
- Since:
- Oct 17, 2004
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/fun/SqlCountAggFunction.java#16 $
- Author:
- Julian Hyde
Methods inherited from class org.eigenbase.sql.SqlOperator |
acceptCall, acceptCall, adjustType, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands |
type
public static final RelDataType type
SqlCountAggFunction
public SqlCountAggFunction()
getParameterTypes
public RelDataType[] getParameterTypes(RelDataTypeFactory typeFactory)
- Description copied from interface:
Aggregation
- Returns the parameter types accepted by this Aggregation.
- Parameters:
typeFactory
- Type factory to create the types
- Returns:
- Array of parameter types
getReturnType
public RelDataType getReturnType(RelDataTypeFactory typeFactory)
- Description copied from interface:
Aggregation
- Returns the type of the result yielded by this Aggregation.
- Parameters:
typeFactory
- Type factory to create the type
- Returns:
- Result type
getStartParameterTypes
public OJClass[] getStartParameterTypes()
- Overrides:
getStartParameterTypes
in class SqlAggFunction
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.eigenbase.sql.SqlOperatorBinding)
, specific operators would not typically override
this method.
- Overrides:
deriveType
in class SqlFunction
- Parameters:
validator
- Validatorscope
- Scope of validationcall
- Call to this operator
- Returns:
- Type of call