org.eigenbase.rel
Class AggregateRelBase.AggCallBinding

java.lang.Object
  extended by org.eigenbase.sql.SqlOperatorBinding
      extended by org.eigenbase.rel.AggregateRelBase.AggCallBinding
Enclosing class:
AggregateRelBase

public static class AggregateRelBase.AggCallBinding
extends SqlOperatorBinding

Implementation of the SqlOperatorBinding interface for an aggregate call applied to a set of operands in the context of a AggregateRel.


Field Summary
private  AggregateRelBase aggregateRel
           
private  List<Integer> operands
           
 
Fields inherited from class org.eigenbase.sql.SqlOperatorBinding
typeFactory
 
Constructor Summary
AggregateRelBase.AggCallBinding(RelDataTypeFactory typeFactory, SqlAggFunction aggFunction, AggregateRelBase aggregateRel, List<Integer> operands)
          Creates an AggCallBinding
 
Method Summary
 int getOperandCount()
           
 RelDataType getOperandType(int ordinal)
          Gets the type of a bound operand.
 EigenbaseException newError(SqlValidatorException e)
          Wraps a validation error with context appropriate to this operator call.
 
Methods inherited from class org.eigenbase.sql.SqlOperatorBinding
collectOperandTypes, getColumnListParamInfo, getCursorOperand, getIntLiteralOperand, getOperator, getStringLiteralOperand, getTypeFactory, isOperandNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aggregateRel

private final AggregateRelBase aggregateRel

operands

private final List<Integer> operands
Constructor Detail

AggregateRelBase.AggCallBinding

AggregateRelBase.AggCallBinding(RelDataTypeFactory typeFactory,
                                SqlAggFunction aggFunction,
                                AggregateRelBase aggregateRel,
                                List<Integer> operands)
Creates an AggCallBinding

Parameters:
typeFactory - Type factory
aggFunction - Aggregation function
aggregateRel - Relational expression which is context
operands - Operand ordinals
Method Detail

getOperandCount

public int getOperandCount()
Specified by:
getOperandCount in class SqlOperatorBinding
Returns:
the number of bound operands

getOperandType

public RelDataType getOperandType(int ordinal)
Description copied from class: SqlOperatorBinding
Gets the type of a bound operand.

Specified by:
getOperandType in class SqlOperatorBinding
Parameters:
ordinal - zero-based ordinal of operand of interest
Returns:
bound operand type

newError

public EigenbaseException newError(SqlValidatorException e)
Description copied from class: SqlOperatorBinding
Wraps a validation error with context appropriate to this operator call.

Specified by:
newError in class SqlOperatorBinding
Parameters:
e - Validation error
Returns:
Error wrapped, if possible, with positional information