presto-orc/src/main/java/io/prestosql/orc/metadata/statistics/IntegerStatisticsBuilder.java/IntegerStatisticsBuilder/mergeIntegerStatistics
class IntegerStatisticsBuilder:    public static Optional<IntegerStatistics> mergeIntegerStatistics(List<ColumnStatistics> stats)
    {
        IntegerStatisticsBuilder integerStatisticsBuilder = new IntegerStatisticsBuilder();
        for (ColumnStatistics columnStatistics : stats) {
            IntegerStatistics partialStatistics = columnStatistics.getIntegerStatistics();
            if (columnStatistics.getNumberOfValues() > 0) {
                if (partialStatistics == null) {
                    // there are non null values but no statistics, so we can not say anything about the data
                    return Optional.empty();
                }
                integerStatisticsBuilder.addIntegerStatistics(columnStatistics.getNumberOfValues(), partialStatistics);
            }
        }
        return integerStatisticsBuilder.buildIntegerStatistics();
    }