Class GenericAggregator


  • class GenericAggregator
    extends java.lang.Object
    Adaptor that sits between execution layer and aggregates.
    • Field Detail

      • aggregatorColumnId

        int aggregatorColumnId
      • inputColumnId

        private int inputColumnId
      • resultColumnId

        private int resultColumnId
    • Constructor Detail

      • GenericAggregator

        GenericAggregator​(AggregatorInfo aggInfo,
                          ClassFactory cf)
        Constructor:
        Parameters:
        aggInfo - information about the user aggregate
        cf - the class factory.
    • Method Detail

      • accumulate

        void accumulate​(ExecRow inputRow,
                        ExecRow accumulateRow)
                 throws StandardException
        Accumulate the aggregate results. This is the guts of the aggregation. We will call the user aggregate on itself to do the aggregation.
        Parameters:
        inputRow - the row with the input colum
        accumulateRow - the row with the aggregator
        Throws:
        StandardException - on error
      • accumulate

        void accumulate​(java.lang.Object[] inputRow,
                        java.lang.Object[] accumulateRow)
                 throws StandardException
        Accumulate the aggregate results. This is the guts of the aggregation. We will call the user aggregate on itself to do the aggregation.
        Parameters:
        inputRow - the row with the input colum
        accumulateRow - the row with the aggregator
        Throws:
        StandardException - on error
      • merge

        void merge​(ExecRow inputRow,
                   ExecRow mergeRow)
            throws StandardException
        Merge the aggregate results. This is the guts of the aggregation. We will call the user aggregate on itself to do the aggregation.
        Parameters:
        inputRow - the row with the input colum
        mergeRow - the row with the aggregator
        Throws:
        StandardException - on error
      • merge

        void merge​(java.lang.Object[] inputRow,
                   java.lang.Object[] mergeRow)
            throws StandardException
        Merge the aggregate results. This is the guts of the aggregation. We will call the user aggregate on itself to do the aggregation.
        Parameters:
        inputRow - the row with the input colum
        mergeRow - the row with the aggregator
        Throws:
        StandardException - on error
      • finish

        boolean finish​(ExecRow row)
                throws StandardException
        Get the results of the aggregation and put it in the result column.
        Parameters:
        row - the row with the result and the aggregator
        Throws:
        StandardException - on error
      • getColumnId

        int getColumnId()
        Return the column id that is being aggregated