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.| Modifier and Type | Field and Description |
|---|---|
private boolean |
filter |
private int |
groupCount |
private List<RelDataType> |
operands |
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() |
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(Resources.ExInst<SqlValidatorException> e)
Wraps a validation error with context appropriate to this operator call.
|
collectOperandTypes, getColumnListParamInfo, getCursorOperand, getIntLiteralOperand, getOperandLiteralValue, getOperandLiteralValue, getOperandMonotonicity, getOperator, getStringLiteralOperand, getTypeFactory, isOperandLiteral, isOperandNullprivate final List<RelDataType> operands
private final int groupCount
private final boolean filter
public 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()
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–2018 The Apache Software Foundation. All rights reserved.