presto-main/src/main/java/io/prestosql/operator/aggregation/DoubleSumAggregation.java/DoubleSumAggregation/output
class DoubleSumAggregation:    @OutputFunction(StandardTypes.DOUBLE)
    public static void output(@AggregationState LongDoubleState state, BlockBuilder out)
    {
        if (state.getFirst() == 0) {
            out.appendNull();
        }
        else {
            DoubleType.DOUBLE.writeDouble(out, state.getSecond());
        }
    }