**Describe the unexpected behaviour**
max(date) and min(date) always return the same negative value: -127593672

**How to reproduce**
ClickHouse version: Docker -- clickhouse/clickhouse-server:22.6.8.35-alpine
Architecture: linux/arm64

```
MySQL [test]> create table test_date (
  date Int32,
  hour Int32
  ) ENGINE = MergeTree ORDER BY (date);
    ->     ->     -> Query OK, 0 rows affected (0.01 sec)
```
```
MySQL [test]> insert into test_date values(20220920, 1);
Query OK, 1 row affected (0.00 sec)
```
```
MySQL [test]> select max(date) from test_date;
+-----------------+
| maxOrNull(date) |
+-----------------+
| -127593672      |
+-----------------+
1 row in set (0.00 sec)
```
```
MySQL [test]> select max(hour) from test_date;
+-----------------+
| maxOrNull(hour) |
+-----------------+
| 1               |
+-----------------+
1 row in set (0.00 sec)
```
**Expected behavior**
I expect it to return ``20220920``.

auto parts_to_throw_insert = query_settings.parts_to_throw_insert ? query_settings.parts_to_throw_insert : settings->parts_to_throw_insert;
    size_t average_part_size = parts_count_in_partition ? size_of_partition / parts_count_in_partition : 0;
    bool parts_are_large_enough_in_average = settings->max_avg_part_size_for_too_many_parts
        && average_part_size > settings->max_avg_part_size_for_too_many_parts;
    if (parts_count_in_partition >= parts_to_throw_insert && !parts_are_large_enough_in_average)
    {
        ProfileEvents::increment(ProfileEvents::RejectedInserts);
        throw Exception(
            ErrorCodes::TOO_MANY_PARTS,
            "Too many parts ({} with average size of {}). Merges are processing significantly slower than inserts",
            parts_count_in_partition, ReadableSize(average_part_size));
    }
    if (k_inactive < 0 && parts_count_in_partition < parts_to_delay_insert)
        return;
    const ssize_t k_active = ssize_t(parts_count_in_partition) - ssize_t(parts_to_delay_insert);
    size_t max_k;
    size_t k;
    if (k_active > k_inactive && !parts_are_large_enough_in_average)
    {
        max_k = parts_to_throw_insert - parts_to_delay_insert;
        k = k_active + 1;
    }
    else
    {
        max_k = settings->inactive_parts_to_throw_insert - settings->inactive_parts_to_delay_insert;
        k = k_inactive + 1;
    }
    const UInt64 delay_milliseconds = static_cast<UInt64>(::pow(settings->max_delay_to_insert * 1000, static_cast<double>(k) / max_k));
    ProfileEvents::increment(ProfileEvents::DelayedInserts);
    ProfileEvents::increment(ProfileEvents::DelayedInsertsMilliseconds, delay_milliseconds);