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

case PartitionCommand::ATTACH_PARTITION:
                current_command_results = attachPartition(command.partition, metadata_snapshot, command.part, query_context);
                break;
            case PartitionCommand::MOVE_PARTITION:
            {
                switch (*command.move_destination_type)
                {
                    case PartitionCommand::MoveDestinationType::DISK:
                        movePartitionToDisk(command.partition, command.move_destination_name, command.part, query_context);
                        break;
                    case PartitionCommand::MoveDestinationType::VOLUME:
                        movePartitionToVolume(command.partition, command.move_destination_name, command.part, query_context);
                        break;
                    case PartitionCommand::MoveDestinationType::TABLE:
                    {
                        String dest_database = query_context->resolveDatabase(command.to_database);
                        auto dest_storage = DatabaseCatalog::instance().getTable({dest_database, command.to_table}, query_context);
                        movePartitionToTable(dest_storage, command.partition, query_context);
                    }
                    break;
                    case PartitionCommand::MoveDestinationType::SHARD:
                    {
                        if (!getSettings()->part_moves_between_shards_enable)
                            throw Exception(ErrorCodes::SUPPORT_IS_DISABLED,
                                            "Moving parts between shards is experimental and work in progress"
                                            ", see part_moves_between_shards_enable setting");
                        movePartitionToShard(command.partition, command.part, command.move_destination_name, query_context);
                    }
                    break;
                }