```sql
CREATE TABLE test_tbl
(   `ip` String, `ipv6` IPv6 MATERIALIZED toIPv6(ip) )
ENGINE = Memory;

insert into test_tbl(ip) values ( 'fe80::9801:43ff:fe1f:7690'), ('1.1.1.1'), (''), ('::ffff:1.1.1.1' );

 DB::Exception: Invalid IPv6 value: while executing 'FUNCTION _CAST(toIPv6(ip) :: 2, 'IPv6' :: 1)


set cast_ipv4_ipv6_default_on_conversion_error=1;
insert into test_tbl(ip) values ( 'fe80::9801:43ff:fe1f:7690'), ('1.1.1.1'), (''), ('::ffff:1.1.1.1' );
 
 DB::Exception: Invalid IPv6 value: while executing 'FUNCTION _CAST(toIPv6(ip)
```

`toIPv6OrDefault` does not help in this case.

```sql
CREATE TABLE test_tbl
(   `ip` String, `ipv6` IPv6 MATERIALIZED toIPv6OrDefault(ip) )
ENGINE = Memory;

insert into test_tbl(ip) values ( 'fe80::9801:43ff:fe1f:7690'), ('1.1.1.1'), (''), ('::ffff:1.1.1.1' );
  DB::Exception: Invalid IPv6 value: while executing 'FUNCTION _CAST(toIPv6OrD

insert into test_tbl(ip) values ( 'fe80::9801:43ff:fe1f:7690'), ('1.1.1.1'), (''), ('::ffff:1.1.1.1' ), ('garbudge');
  DB::Exception: Invalid IPv6 value: while executing 'FUNCTION
```

WA:

```sql
CREATE TABLE test_tbl
(   `ip` String, `ipv6` IPv6 MATERIALIZED if(ip='', '::', ip) )
ENGINE = Memory;

insert into test_tbl(ip) values ( 'fe80::9801:43ff:fe1f:7690'), ('1.1.1.1'), (''), ('::ffff:1.1.1.1' );

select ip, ipv6 from test_tbl;
┌─ip────────────────────────┬─ipv6──────────────────────┐
│ fe80::9801:43ff:fe1f:7690 │ fe80::9801:43ff:fe1f:7690 │
│ 1.1.1.1                   │ ::ffff:1.1.1.1            │
│                           │ ::                        │
│ ::ffff:1.1.1.1            │ ::ffff:1.1.1.1            │
└───────────────────────────┴───────────────────────────┘
```
bool allow_missing_columns = false;
        int64_t row_batch_size = 100'000;
        bool case_insensitive_column_matching = false;
    } orc;
    
    
    enum class EnumComparingMode
    {
        BY_NAMES, 
        BY_NAMES_CASE_INSENSITIVE, 
        BY_VALUES, 
    };
    struct
    {
        EnumComparingMode enum_comparing_mode = EnumComparingMode::BY_VALUES;
    } capn_proto;
    enum class MsgPackUUIDRepresentation
    {
        STR, 
        BIN, 
        EXT, 
    };
    struct
    {
        UInt64 number_of_columns = 0;
        MsgPackUUIDRepresentation output_uuid_representation = MsgPackUUIDRepresentation::EXT;
    } msgpack;
};
}