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

```
readText(value, buf);
                res.emplace_back(value);
                break;
            }
        }
        if (i + 1 != num_keys)
            assertChar('-', buf);
    }
    assertEOF(buf);
    String expected_partition_id = MergeTreePartition{res}.getID(partition_key_sample);
    if (expected_partition_id != partition_id)
        throw Exception(ErrorCodes::LOGICAL_ERROR, "Partition ID was parsed incorrectly: expected {}, got {}",
                        expected_partition_id, partition_id);
    return res;
}
void MergeTreePartition::serializeText(const MergeTreeData & storage, WriteBuffer & out, const FormatSettings & format_settings) const
{
    auto metadata_snapshot = storage.getInMemoryMetadataPtr();
    const auto & partition_key_sample = metadata_snapshot->getPartitionKey().sample_block;
    size_t key_size = partition_key_sample.columns();
    if (key_size == 0)
    {
        writeCString("tuple()", out);
    }
    else if (key_size == 1)
    {
        const DataTypePtr & type = partition_key_sample.getByPosition(0).type;
        auto column = type->createColumn();
        column->insert(value[0]);
        type->getDefaultSerialization()->serializeText(*column, 0, out, format_settings);