**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 : data_parts_by_info)
        part->data_part_storage->changeRootPath(relative_data_path, new_table_path);
    relative_data_path = new_table_path;
    renameInMemory(new_table_id);
}
void MergeTreeData::renameInMemory(const StorageID & new_table_id)
{
    IStorage::renameInMemory(new_table_id);
    std::atomic_store(&log_name, std::make_shared<String>(new_table_id.getNameForLogs()));
    log = &Poco::Logger::get(*log_name);
}
void MergeTreeData::dropAllData()
{
    LOG_TRACE(log, "dropAllData: waiting for locks.");
    auto settings_ptr = getSettings();
    auto lock = lockParts();
    DataPartsVector all_parts(data_parts_by_info.begin(), data_parts_by_info.end());
    {
        std::lock_guard wal_lock(write_ahead_log_mutex);
        if (write_ahead_log)
            write_ahead_log->shutdown();
    }
    
    
    if (!getStorageID().hasUUID())
        getContext()->dropCaches();
    
    NameSet part_names_failed;
    try
    {