public static class Aggregate.AggCallBinding extends SqlOperatorBinding
SqlOperatorBinding interface for an
aggregate call applied to a set of operands in the
context of a LogicalAggregate.typeFactory| Constructor and Description |
|---|
AggCallBinding(RelDataTypeFactory typeFactory,
SqlAggFunction aggFunction,
List<RelDataType> operands,
int groupCount,
boolean filter)
Creates an AggCallBinding.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getGroupCount()
If the operator call occurs in an aggregate query, returns the number of
columns in the GROUP BY clause.
|
int |
getOperandCount()
Returns the number of bound operands.
|
RelDataType |
getOperandType(int ordinal)
Gets the type of a bound operand.
|
boolean |
hasFilter()
Returns whether the operator is an aggregate function with a filter.
|
CalciteException |
newError(org.apache.calcite.runtime.Resources.ExInst<SqlValidatorException> e)
Wraps a validation error with context appropriate to this operator call.
|
collectOperandTypes, getColumnListParamInfo, getCursorOperand, getIntLiteralOperand, getOperandLiteralValue, getOperandLiteralValue, getOperandLiteralValue, getOperandMonotonicity, getOperator, getStringLiteralOperand, getTypeFactory, isOperandLiteral, isOperandNullpublic AggCallBinding(RelDataTypeFactory typeFactory, SqlAggFunction aggFunction, List<RelDataType> operands, int groupCount, boolean filter)
typeFactory - Type factoryaggFunction - Aggregate functionoperands - Data types of operandsgroupCount - Number of columns in the GROUP BY clausefilter - Whether the aggregate function has a FILTER clausepublic int getGroupCount()
SqlOperatorBindingReturns 0 if the query is implicitly "GROUP BY ()" because of an aggregate expression. For example, "SELECT sum(sal) FROM emp".
Returns -1 if the query is not an aggregate query.
getGroupCount in class SqlOperatorBindingpublic boolean hasFilter()
SqlOperatorBindinghasFilter in class SqlOperatorBindingpublic int getOperandCount()
SqlOperatorBindinggetOperandCount in class SqlOperatorBindingpublic RelDataType getOperandType(int ordinal)
SqlOperatorBindinggetOperandType in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestpublic CalciteException newError(org.apache.calcite.runtime.Resources.ExInst<SqlValidatorException> e)
SqlOperatorBindingnewError in class SqlOperatorBindinge - Validation error, not nullCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.