```
$ ~/arc/build/clickhouse/programs/clickhouse client
ClickHouse client version 21.2.1.1-arcadia.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.2.1 revision 54447.

max42-dev.sas.yp-c.yandex.net :) create table t(a Tuple(UInt8, UInt8)) engine = Log()

CREATE TABLE t
(
    `a` Tuple(UInt8, UInt8)
)
ENGINE = Log

Query id: b49dbb5d-d2a9-4c99-b90e-00c60edf2103

Ok.

0 rows in set. Elapsed: 0.005 sec. 

max42-dev.sas.yp-c.yandex.net :) insert into t values ((NULL, 42))

INSERT INTO t VALUES

Query id: 318d6f3e-f3bc-467c-85ff-62da908230dd

Logical error: 'Unexpected literal type inside Array: Nothing. It's a bug'.
Aborted (core dumped)
```

This is CH similar to one from Arcadia r7788360 (~fresh master version from GH).

(you don't have to strictly follow this form)

{
    if (from_value.isNull())
        return from_value;
    if (from_type_hint && from_type_hint->equals(to_type))
        return from_value;
    if (const auto * low_cardinality_type = typeid_cast<const DataTypeLowCardinality *>(&to_type))
        return convertFieldToType(from_value, *low_cardinality_type->getDictionaryType(), from_type_hint);
    else if (const auto * nullable_type = typeid_cast<const DataTypeNullable *>(&to_type))
    {
        const IDataType & nested_type = *nullable_type->getNestedType();
        if (from_type_hint && from_type_hint->equals(nested_type))
            return from_value;
        return convertFieldToTypeImpl(from_value, nested_type, from_type_hint);
    }
    else
        return convertFieldToTypeImpl(from_value, to_type, from_type_hint);
}
Field convertFieldToTypeOrThrow(const Field & from_value, const IDataType & to_type, const IDataType * from_type_hint)
{
    bool is_null = from_value.isNull();
    if (is_null && !to_type.isNullable())
        throw Exception(ErrorCodes::TYPE_MISMATCH, "Cannot convert NULL to {}", to_type.getName());
    Field converted = convertFieldToType(from_value, to_type, from_type_hint);
    if (!is_null && converted.isNull())
        throw Exception(ErrorCodes::ARGUMENT_OUT_OF_BOUND, "Cannot convert value{}: it cannot be represented as {}",
                        from_type_hint ? " from " + from_type_hint->getName() : "", to_type.getName());
    return converted;
}
}