Inclusion (`IN`/`NOT IN`) test does not work when the subquery returns IPv6 values.

**Does it reproduce on recent release?**

Yes, on version `22.3.2`.

**How to reproduce**

On a stock Docker container (`clickhouse/clickhouse-server:22`):
```sql
CREATE TABLE IF NOT EXISTS test_ipv6 (a IPv6) ENGINE = MergeTree ORDER BY a;
INSERT INTO test_ipv6 VALUES ('::ffff:1.1.1.1'),('::ffff:2.2.2.2');
```

```sql
SELECT a FROM test_ipv6 FORMAT TabSeparated;
-- ::ffff:1.1.1.1
-- ::ffff:2.2.2.2
-- OK!

SELECT a FROM test_ipv6 WHERE a <= toIPv6('::ffff:1.1.1.1') FORMAT TabSeparated;
-- ::ffff:1.1.1.1
-- OK!

SELECT a
FROM test_ipv6
WHERE a IN (
    SELECT a
    FROM test_ipv6
    WHERE a <= toIPv6('::ffff:1.1.1.1')
);
-- Received exception from server (version 22.3.2):
-- Code: 441. DB::Exception: Received from localhost:9000. DB::Exception: Invalid IPv6 value: while executing 'FUNCTION in(a : 0, __set :: 1) -> in(a, _subquery9) UInt8 : 2'. (CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING)
```

**Expected behavior**

The last query should work and return `::ffff:1.1.1.1`.

**Error message and/or stacktrace**

```
Received exception from server (version 22.3.2):
Code: 441. DB::Exception: Received from localhost:9000. DB::Exception: Invalid IPv6 value: while executing 'FUNCTION in(a : 0, __set :: 1) -> in(a, _subquery9) UInt8 : 2'. (CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING)
```

**Additional context**

- Same issue with two different tables (e.g. `test_ipv6_1` and `test_ipv6_2`).
- Works on ClickHouse 21.
  
struct NameToDecimal32OrZero { static constexpr auto name = "toDecimal32OrZero"; };
struct NameToDecimal64OrZero { static constexpr auto name = "toDecimal64OrZero"; };
struct NameToDecimal128OrZero { static constexpr auto name = "toDecimal128OrZero"; };
struct NameToDecimal256OrZero { static constexpr auto name = "toDecimal256OrZero"; };
struct NameToUUIDOrZero { static constexpr auto name = "toUUIDOrZero"; };
using FunctionToUInt8OrZero = FunctionConvertFromString<DataTypeUInt8, NameToUInt8OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToUInt16OrZero = FunctionConvertFromString<DataTypeUInt16, NameToUInt16OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToUInt32OrZero = FunctionConvertFromString<DataTypeUInt32, NameToUInt32OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToUInt64OrZero = FunctionConvertFromString<DataTypeUInt64, NameToUInt64OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToUInt128OrZero = FunctionConvertFromString<DataTypeUInt128, NameToUInt128OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToUInt256OrZero = FunctionConvertFromString<DataTypeUInt256, NameToUInt256OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToInt8OrZero = FunctionConvertFromString<DataTypeInt8, NameToInt8OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToInt16OrZero = FunctionConvertFromString<DataTypeInt16, NameToInt16OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToInt32OrZero = FunctionConvertFromString<DataTypeInt32, NameToInt32OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToInt64OrZero = FunctionConvertFromString<DataTypeInt64, NameToInt64OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToInt128OrZero = FunctionConvertFromString<DataTypeInt128, NameToInt128OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToInt256OrZero = FunctionConvertFromString<DataTypeInt256, NameToInt256OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToFloat32OrZero = FunctionConvertFromString<DataTypeFloat32, NameToFloat32OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToFloat64OrZero = FunctionConvertFromString<DataTypeFloat64, NameToFloat64OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToDateOrZero = FunctionConvertFromString<DataTypeDate, NameToDateOrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToDate32OrZero = FunctionConvertFromString<DataTypeDate32, NameToDate32OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToDateTimeOrZero = FunctionConvertFromString<DataTypeDateTime, NameToDateTimeOrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToDateTime64OrZero = FunctionConvertFromString<DataTypeDateTime64, NameToDateTime64OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToDecimal32OrZero = FunctionConvertFromString<DataTypeDecimal<Decimal32>, NameToDecimal32OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToDecimal64OrZero = FunctionConvertFromString<DataTypeDecimal<Decimal64>, NameToDecimal64OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToDecimal128OrZero = FunctionConvertFromString<DataTypeDecimal<Decimal128>, NameToDecimal128OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToDecimal256OrZero = FunctionConvertFromString<DataTypeDecimal<Decimal256>, NameToDecimal256OrZero, ConvertFromStringExceptionMode::Zero>;
using FunctionToUUIDOrZero = FunctionConvertFromString<DataTypeUUID, NameToUUIDOrZero, ConvertFromStringExceptionMode::Zero>;
struct NameToUInt8OrNull { static constexpr auto name = "toUInt8OrNull"; };
struct NameToUInt16OrNull { static constexpr auto name = "toUInt16OrNull"; };