**How to reproduce**

clickhouse-local:
```
CREATE TABLE f (`s` String) ENGINE = File(TSV, '/dev/null');
CREATE VIEW v AS SELECT * FROM f;
SELECT '', NULL FROM merge('', '\0');
```

{
    if (type->isNullable())
        return true;
    if (const auto * lc_type = typeid_cast<const DataTypeLowCardinality *>(type.get()))
        return lc_type->getDictionaryType()->isNullable();
    return false;
}
bool changedNullabilityOneWay(const Block & src_block, const Block & dst_block)
{
    std::unordered_map<String, bool> src_nullable;
    for (const auto & col : src_block)
        src_nullable[col.name] = isNullableOrLcNullable(col.type);
    for (const auto & col : dst_block)
    {
        if (!isNullableOrLcNullable(col.type) && src_nullable[col.name])
            return true;
    }
    return false;
}
bool hasJoin(const ASTSelectQuery & select)
{
    const auto & tables = select.tables();
    if (!tables || tables->children.size() < 2)
        return false;
    const auto & joined_table = tables->children[1]->as<ASTTablesInSelectQueryElement &>();
    return joined_table.table_join != nullptr;
}
bool hasJoin(const ASTSelectWithUnionQuery & ast)