**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``.

for (const auto & part_info : detached_parts)
        {
            LOG_DEBUG(log, "Found part {}", part_info.dir_name);
            active_parts.add(part_info.dir_name);
        }
        LOG_DEBUG(log, "{} of them are active", active_parts.size());
        
        for (const auto & part_info : detached_parts)
        {
            const String containing_part = active_parts.getContainingPart(part_info.dir_name);
            if (!containing_part.empty() && containing_part != part_info.dir_name)
                part_info.disk->moveDirectory(fs::path(relative_data_path) / source_dir / part_info.dir_name,
                    fs::path(relative_data_path) / source_dir / ("inactive_" + part_info.dir_name));
            else
                renamed_parts.addPart(part_info.dir_name, "attaching_" + part_info.dir_name, part_info.disk);
        }
    }
    
    renamed_parts.tryRenameAll();
    
    LOG_DEBUG(log, "Checking parts");
    MutableDataPartsVector loaded_parts;
    loaded_parts.reserve(renamed_parts.old_and_new_names.size());
    for (const auto & [old_name, new_name, disk] : renamed_parts.old_and_new_names)
    {
        LOG_DEBUG(log, "Checking part {}", new_name);
        auto single_disk_volume = std::make_shared<SingleDiskVolume>("volume_" + old_name, disk);
        auto data_part_storage = std::make_shared<DataPartStorageOnDisk>(single_disk_volume, relative_data_path, source_dir + new_name);
        MutableDataPartPtr part = createPart(old_name, data_part_storage);
        loadPartAndFixMetadataImpl(part);