```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 (value.size() != partition_key_sample.columns())
        throw Exception("Invalid partition key size: " + toString(value.size()), ErrorCodes::LOGICAL_ERROR);
    if (value.empty())
        return "all"; 
    
    
    
    
    bool are_all_integral = true;
    for (const Field & field : value)
    {
        if (field.getType() != Field::Types::UInt64 && field.getType() != Field::Types::Int64)
        {
            are_all_integral = false;
            break;
        }
    }
    String result;
    if (are_all_integral)
    {
        FieldVisitorToString to_string_visitor;
        for (size_t i = 0; i < value.size(); ++i)
        {
            if (i > 0)
                result += '-';
            if (typeid_cast<const DataTypeDate *>(partition_key_sample.getByPosition(i).type.get()))
                result += toString(DateLUT::instance().toNumYYYYMMDD(DayNum(value[i].safeGet<UInt64>())));
            else