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

{
            part_column = ColumnConst::create(std::move(part_column), 1);
            partition_id_column = ColumnConst::create(std::move(partition_id_column), 1);
            part_uuid_column = ColumnConst::create(std::move(part_uuid_column), 1);
            if (has_partition_value)
                partition_value_column = ColumnConst::create(std::move(partition_value_column), 1);
            break;
        }
    }
    block.setColumns(std::move(columns));
    if (!has_partition_value)
        block.erase("_partition_value");
    return block;
}
std::optional<UInt64> MergeTreeData::totalRowsByPartitionPredicateImpl(
    const SelectQueryInfo & query_info, ContextPtr local_context, const DataPartsVector & parts) const
{
    if (parts.empty())
        return 0u;
    auto metadata_snapshot = getInMemoryMetadataPtr();
    ASTPtr expression_ast;
    Block virtual_columns_block = getBlockWithVirtualPartColumns(parts, true );
    
    bool valid = VirtualColumnUtils::prepareFilterBlockWithQuery(query_info.query, local_context, virtual_columns_block, expression_ast);
    PartitionPruner partition_pruner(metadata_snapshot, query_info, local_context, true );
    if (partition_pruner.isUseless() && !valid)
        return {};
    std::unordered_set<String> part_values;
    if (valid && expression_ast)
    {