public void merge(FunctionContext context, Tuple params) {
SumContext distinctContext = (SumContext) context;
Datum value = params.get(0);
if ((distinctContext.latest == null || (!distinctContext.latest.equals(value)) && !(value instanceof NullDatum))) {
distinctContext.latest = value;
distinctContext.sum += value.asFloat4();
}
}
@Override
public Datum getPartialResult(FunctionContext ctx) {