Class Aggregate.AggCallBinding

    • Field Detail

      • operands

        private final java.util.List<RelDataType> operands
      • groupCount

        private final int groupCount
      • filter

        private final boolean filter
    • Constructor Detail

      • AggCallBinding

        public AggCallBinding​(RelDataTypeFactory typeFactory,
                              SqlAggFunction aggFunction,
                              java.util.List<RelDataType> operands,
                              int groupCount,
                              boolean filter)
        Creates an AggCallBinding
        typeFactory - Type factory
        aggFunction - Aggregate function
        operands - Data types of operands
        groupCount - Number of columns in the GROUP BY clause
        filter - Whether the aggregate function has a FILTER clause
    • Method Detail

      • getGroupCount

        public int getGroupCount()
        Description copied from class: SqlOperatorBinding
        If the operator call occurs in an aggregate query, returns the number of columns in the GROUP BY clause. For example, for "SELECT count(*) FROM emp GROUP BY deptno, gender", returns 2.

        Returns 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 SqlOperatorBinding
      • getOperandType

        public RelDataType getOperandType​(int ordinal)
        Description copied from class: SqlOperatorBinding
        Gets the type of a bound operand.
        Specified by:
        getOperandType in class SqlOperatorBinding
        ordinal - zero-based ordinal of operand of interest
        bound operand type