```sql
create table test ( ipv4 IPv4, ipv6 IPv6 ) Engine MergeTree partition by ipv4 order by ipv4 as select '1.2.3.4', '::ffff:1.2.3.4';
select *, _part from test;

22.12
┌─ipv4────┬─ipv6───────────┬─_part──────────┐
│ 1.2.3.4 │ ::ffff:1.2.3.4 │ 16909060_1_1_0 │
└─────────┴────────────────┴────────────────┘

22.13
┌─ipv4────┬─ipv6───────────┬─_part──────────────────────────────────┐
│ 1.2.3.4 │ ::ffff:1.2.3.4 │ bb9df6e3b66e8909ecb142a41a3e6323_1_1_0 │
└─────────┴────────────────┴────────────────────────────────────────┘
```

```sql
create table test ( ipv4 IPv4, ipv6 IPv6 ) Engine MergeTree partition by ipv6 order by ipv6 as select '1.2.3.4', '::ffff:1.2.3.4';
select *, _part from test;

22.12
┌─ipv4────┬─ipv6───────────┬─_part──────────────────────────────────┐
│ 1.2.3.4 │ ::ffff:1.2.3.4 │ 1334d7cc23ffb5a5c0262304b3313426_1_1_0 │
└─────────┴────────────────┴────────────────────────────────────────┘

22.13
┌─ipv4────┬─ipv6───────────┬─_part──────────────────────────────────┐
│ 1.2.3.4 │ ::ffff:1.2.3.4 │ 45c632749fb22384025ef5d0c817e71e_1_1_0 │
└─────────┴────────────────┴────────────────────────────────────────┘

```
{
    if (!metadata_snapshot->hasPartitionKey())
        return;
    auto partition_key_names_and_types = executePartitionByExpression(metadata_snapshot, block, context);
    value.resize(partition_key_names_and_types.size());
    
    
    
    static constexpr auto modulo_legacy_function_name = "moduloLegacy";
    size_t i = 0;
    for (const auto & element : partition_key_names_and_types)
    {
        auto & partition_column = block.getByName(element.name);
        if (element.name.starts_with(modulo_legacy_function_name))
            partition_column.name = "modulo" + partition_column.name.substr(std::strlen(modulo_legacy_function_name));
        partition_column.column->get(row, value[i++]);
    }
}
NamesAndTypesList MergeTreePartition::executePartitionByExpression(const StorageMetadataPtr & metadata_snapshot, Block & block, ContextPtr context)