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 |
|---|
Aggregate.AggCallBinding(RelDataTypeFactory typeFactory,
SqlAggFunction aggFunction,
List<RelDataType> operands,
int groupCount)
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() |
RelDataType |
getOperandType(int ordinal)
Gets the type of a bound operand.
|
CalciteException |
newError(Resources.ExInst<SqlValidatorException> e)
Wraps a validation error with context appropriate to this operator call.
|
collectOperandTypes, getColumnListParamInfo, getCursorOperand, getIntLiteralOperand, getOperator, getStringLiteralOperand, getTypeFactory, isOperandNullpublic Aggregate.AggCallBinding(RelDataTypeFactory typeFactory, SqlAggFunction aggFunction, List<RelDataType> operands, int groupCount)
typeFactory - Type factoryaggFunction - Aggregate functionoperands - Data types of operandsgroupCount - Number of columns in the GROUP BY 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 int getOperandCount()
getOperandCount in class SqlOperatorBindingpublic RelDataType getOperandType(int ordinal)
SqlOperatorBindinggetOperandType in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestpublic CalciteException newError(Resources.ExInst<SqlValidatorException> e)
SqlOperatorBindingnewError in class SqlOperatorBindinge - Validation error, not nullCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.