presto-main/src/main/java/io/prestosql/operator/aggregation/RealAverageAggregation.java/RealAverageAggregation/output
class RealAverageAggregation:    public static void output(LongState count, DoubleState sum, BlockBuilder out)
    {
        if (count.getLong() == 0) {
            out.appendNull();
        }
        else {
            REAL.writeLong(out, floatToIntBits((float) (sum.getDouble() / count.getLong())));
        }
    }