```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 │
└─────────┴────────────────┴────────────────────────────────────────┘

```
{
    auto metadata_snapshot = storage.getInMemoryMetadataPtr();
    const auto & context = storage.getContext();
    const auto & partition_key_sample = adjustPartitionKey(metadata_snapshot, storage.getContext()).sample_block;
    return store(partition_key_sample, data_part_storage, checksums, context->getWriteSettings());
}
std::unique_ptr<WriteBufferFromFileBase> MergeTreePartition::store(const Block & partition_key_sample, IDataPartStorage & data_part_storage, MergeTreeDataPartChecksums & checksums, const WriteSettings & settings) const
{
    if (!partition_key_sample)
        return nullptr;
    auto out = data_part_storage.writeFile("partition.dat", DBMS_DEFAULT_BUFFER_SIZE, settings);
    HashingWriteBuffer out_hashing(*out);
    for (size_t i = 0; i < value.size(); ++i)
    {
        partition_key_sample.getByPosition(i).type->getDefaultSerialization()->serializeBinary(value[i], out_hashing, {});
    }
    out_hashing.next();
    checksums.files["partition.dat"].file_size = out_hashing.count();
    checksums.files["partition.dat"].file_hash = out_hashing.getHash();
    out->preFinalize();
    return out;
}
void MergeTreePartition::create(const StorageMetadataPtr & metadata_snapshot, Block block, size_t row, ContextPtr context)