presto-main/src/main/java/io/prestosql/operator/aggregation/LongSumAggregation.java/LongSumAggregation/removeInput
class LongSumAggregation:    @RemoveInputFunction
    public static void removeInput(@AggregationState LongLongState state, @SqlType(StandardTypes.BIGINT) long value)
    {
        state.setFirst(state.getFirst() - 1);
        state.setSecond(BigintOperators.subtract(state.getSecond(), value));
    }