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
String getName() const override { return name; }
    size_t getNumberOfArguments() const override { return 1; }
    bool isInjective(const ColumnsWithTypeAndName &) const override { return true; }
    bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & ) const override { return false; }
    DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override
    {
        const auto * arg_string = checkAndGetDataType<DataTypeFixedString>(arguments[0].get());
        const auto * arg_ipv6 = checkAndGetDataType<DataTypeIPv6>(arguments[0].get());
        if (!arg_ipv6 && !(arg_string && arg_string->getN() == IPV6_BINARY_LENGTH))
            throw Exception(
                ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
                "Illegal type {} of argument of function {}, expected IPv6 or FixedString({})",
                arguments[0]->getName(), getName(), IPV6_BINARY_LENGTH
            );
        return std::make_shared<DataTypeString>();
    }
    bool useDefaultImplementationForConstants() const override { return true; }
    ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
    {
        const ColumnPtr & column = arguments[0].column;
        const auto * col_ipv6 = checkAndGetColumn<ColumnIPv6>(column.get());
        const auto * col_string = checkAndGetColumn<ColumnFixedString>(column.get());
        if (!col_ipv6 && !(col_string && col_string->getN() == IPV6_BINARY_LENGTH))
            throw Exception(
                ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
                "Illegal column {} of argument of function {}, expected IPv6 or FixedString({})",
                arguments[0].name, getName(), IPV6_BINARY_LENGTH
            );