Package org.apache.calcite.sql.validate
Class SqlUserDefinedAggFunction
- java.lang.Object
-
- org.apache.calcite.sql.SqlOperator
-
- org.apache.calcite.sql.SqlFunction
-
- org.apache.calcite.sql.SqlAggFunction
-
- org.apache.calcite.sql.validate.SqlUserDefinedAggFunction
-
public class SqlUserDefinedAggFunction extends SqlAggFunction
User-defined aggregate function.Created by the validator, after resolving a function call to a function defined in a Calcite schema.
-
-
Field Summary
Fields Modifier and Type Field Description AggregateFunction
function
RelDataTypeFactory
typeFactory
This field is is technical debt; see [CALCITE-2082] Remove RelDataTypeFactory argument from SqlUserDefinedAggFunction constructor.-
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
-
Constructor Summary
Constructors Constructor Description SqlUserDefinedAggFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, AggregateFunction function, boolean requiresOrder, boolean requiresOver, Optionality requiresGroupOrder, RelDataTypeFactory typeFactory)
Creates a SqlUserDefinedAggFunction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<RelDataType>
getParameterTypes(RelDataTypeFactory typeFactory)
java.util.List<RelDataType>
getParamTypes()
RelDataType
getReturnType(RelDataTypeFactory typeFactory)
private java.util.List<RelDataType>
toSql(java.util.List<RelDataType> types)
private RelDataType
toSql(RelDataType type)
-
Methods inherited from class org.apache.calcite.sql.SqlAggFunction
allowsFilter, isAggregator, isQuantifierAllowed, requiresGroupOrder, requiresOrder, requiresOver, unwrap, validateCall
-
Methods inherited from class org.apache.calcite.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamNames, 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
-
-
-
-
Field Detail
-
function
public final AggregateFunction function
-
typeFactory
public final RelDataTypeFactory typeFactory
This field is is technical debt; see [CALCITE-2082] Remove RelDataTypeFactory argument from SqlUserDefinedAggFunction constructor.
-
-
Constructor Detail
-
SqlUserDefinedAggFunction
public SqlUserDefinedAggFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, AggregateFunction function, boolean requiresOrder, boolean requiresOver, Optionality requiresGroupOrder, RelDataTypeFactory typeFactory)
Creates a SqlUserDefinedAggFunction.
-
-
Method Detail
-
getParamTypes
public java.util.List<RelDataType> getParamTypes()
- Overrides:
getParamTypes
in classSqlFunction
- Returns:
- array of parameter types, or null for builtin function
-
toSql
private java.util.List<RelDataType> toSql(java.util.List<RelDataType> types)
-
toSql
private RelDataType toSql(RelDataType type)
-
getParameterTypes
public java.util.List<RelDataType> getParameterTypes(RelDataTypeFactory typeFactory)
- Overrides:
getParameterTypes
in classSqlAggFunction
-
getReturnType
public RelDataType getReturnType(RelDataTypeFactory typeFactory)
- Overrides:
getReturnType
in classSqlAggFunction
-
-