presto-main/src/main/java/io/prestosql/operator/aggregation/DecimalAverageAggregation.java/DecimalAverageAggregation/outputLongDecimal
class DecimalAverageAggregation:    public static void outputLongDecimal(DecimalType type, LongDecimalWithOverflowAndLongState state, BlockBuilder out)
    {
        if (state.getLong() == 0) {
            out.appendNull();
        }
        else {
            writeBigDecimal(type, out, average(state, type));
        }
    }