Class SumAccumulator

java.lang.Object
dev.frostlake.functions.aggregate.SumAccumulator
All Implemented Interfaces:
ApproximateAwareAccumulator, AggregateFunction.Accumulator

public class SumAccumulator extends Object implements AggregateFunction.Accumulator, ApproximateAwareAccumulator
Accumulator for Sum.

Exact inputs sum exactly. A FLOAT input — by its runtime class, or by the argument's DECLARED type when its values arrive in an exact carrier — puts the whole sum on the double path, compensated the way the account adds doubles; a VARIANT input does the same (live: SUM of PARSE_JSON('1') and PARSE_JSON('2') is 3.0, SYSTEM$TYPEOF FLOAT). Every input feeds the double sum in order regardless, so the answer is the same whichever input first decides the tier.