```
$ ~/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)

ConstantExpressionTemplate::Cache::getFromCacheOrConstruct(const DataTypePtr & result_column_type,
                                                           bool null_as_default,
                                                           TokenIterator expression_begin,
                                                           TokenIterator expression_end,
                                                           const ASTPtr & expression_,
                                                           const Context & context,
                                                           bool * found_in_cache,
                                                           const String & salt)
{
    TemplateStructurePtr res;
    ASTPtr expression = expression_->clone();
    ReplaceLiteralsVisitor visitor(context);
    visitor.visit(expression, result_column_type->isNullable() || null_as_default);
    ReplaceQueryParameterVisitor param_visitor(context.getQueryParameters());
    param_visitor.visit(expression);
    size_t template_hash = TemplateStructure::getTemplateHash(expression, visitor.replaced_literals, result_column_type, null_as_default, salt);
    auto iter = cache.find(template_hash);
    if (iter == cache.end())
    {
        if (max_size <= cache.size())
            cache.clear();
        res = std::make_shared<TemplateStructure>(visitor.replaced_literals, expression_begin, expression_end,
                                                  expression, *result_column_type, null_as_default, context);
        cache.insert({template_hash, res});
        if (found_in_cache)
            *found_in_cache = false;
    }
    else
    {