Class InternalFunctionFactory.SumFunction

    • Constructor Detail

      • SumFunction

        public SumFunction​(Expression[] params)
    • Method Detail

      • evalAggregate

        public TObject evalAggregate​(GroupResolver group,
                                     QueryContext context,
                                     TObject ob1,
                                     TObject ob2)
        Description copied from class: AbstractAggregateFunction
        Evaluates the aggregate function for the given values and returns the result. If this aggregate was 'sum' then this method would sum the two values. If this aggregate was 'avg' then this method would also sum the two values and the 'postEvalAggregate' would divide by the number processed.

        NOTE: This first time this method is called on a set, 'val1' is 'null' and 'val2' contains the first value in the set.

        Specified by:
        evalAggregate in class AbstractAggregateFunction