22.12

```sql
SELECT
    toIPv6OrDefault('::ffff:10.10.10.10') AS ipv6,
    cutIPv6(ipv6, 10, 1)

┌─ipv6───────────────┬─cutIPv6(toIPv6OrDefault('::ffff:10.10.10.10'), 10, 1)─┐
│ ::ffff:10.10.10.10 │ ::ffff:10.10.10.0                                     │
└────────────────────┴───────────────────────────────────────────────────────┘
```

22.13.1.1476

```sql
SELECT
    toIPv6OrDefault('::ffff:10.10.10.10') AS ipv6,
    cutIPv6(ipv6, 10, 1)
Code: 43. DB::Exception: Illegal type IPv6 of argument 1 of function cutIPv6, expected FixedString(16): While processing toIPv6OrDefault('::ffff:10.10.10.10') AS ipv6, cutIPv6(ipv6, 10, 1). (ILLEGAL_TYPE_OF_ARGUMENT)
```

https://github.com/ClickHouse/ClickHouse/pull/45018
auto col_res = ColumnString::create();
        ColumnString::Chars & vec_res = col_res->getChars();
        ColumnString::Offsets & offsets_res = col_res->getOffsets();
        vec_res.resize(input_rows_count * (IPV6_MAX_TEXT_LENGTH + 1));
        offsets_res.resize(input_rows_count);
        auto * begin = reinterpret_cast<char *>(vec_res.data());
        auto * pos = begin;
        if (col_ipv6)
        {
            const auto & vec_in = col_ipv6->getData();
            for (size_t i = 0; i < input_rows_count; ++i)
            {
                formatIPv6(reinterpret_cast<const unsigned char *>(&vec_in[i]), pos);
                offsets_res[i] = pos - begin;
            }
        }
        else
        {
            const auto & vec_in = col_string->getChars();
            for (size_t i = 0; i < input_rows_count; ++i)
            {
                formatIPv6(reinterpret_cast<const unsigned char *>(&vec_in[i * IPV6_BINARY_LENGTH]), pos);
                offsets_res[i] = pos - begin;
            }
        }
        vec_res.resize(pos - begin);
        return col_res;
    }
};
class FunctionCutIPv6 : public IFunction