presto-orc/src/main/java/io/prestosql/orc/metadata/statistics/IntegerStatisticsBuilder.java/IntegerStatisticsBuilder/addIntegerStatistics
class IntegerStatisticsBuilder:    private void addIntegerStatistics(long valueCount, IntegerStatistics value)
    {
        requireNonNull(value, "value is null");
        requireNonNull(value.getMin(), "value.getMin() is null");
        requireNonNull(value.getMax(), "value.getMax() is null");

        nonNullValueCount += valueCount;
        minimum = Math.min(value.getMin(), minimum);
        maximum = Math.max(value.getMax(), maximum);

        if (value.getSum() == null) {
            // if input value does not have a sum tag this stat as overflowed
            // to prevent creation of the sum stats (since it was not provided
            // for these values).
            overflow = true;
        }
        else if (!overflow) {
            try {
                sum = addExact(sum, value.getSum());
            }
            catch (ArithmeticException e) {
                overflow = true;
            }
        }
    }