presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/PartitionTable.java/PartitionTable/updateStats
class PartitionTable:        private void updateStats(Map<Integer, Object> current, Map<Integer, Object> newStat, Map<Integer, Long> nullCounts, long recordCount, Predicate<Integer> predicate)
        {
            for (Types.NestedField column : nonPartitionPrimitiveColumns) {
                int id = column.fieldId();

                if (corruptedStats.contains(id)) {
                    continue;
                }

                Object newValue = newStat.get(id);
                // it is expected to not have min/max if all values are null for a column in the datafile and it is not a case of corrupted stats.
                if (newValue == null) {
                    Long nullCount = nullCounts.get(id);
                    if ((nullCount == null) || (nullCount != recordCount)) {
                        current.remove(id);
                        corruptedStats.add(id);
                    }
                    continue;
                }

                Object oldValue = current.putIfAbsent(id, newValue);
                if (oldValue != null) {
                    Comparator<Object> comparator = Comparators.forType(idToTypeMapping.get(id));
                    if (predicate.test(comparator.compare(oldValue, newValue))) {
                        current.put(id, newValue);
                    }
                }
            }
        }