
```
select *
from (
select 'table' as table, toInt64(10) as rows, toInt64(101) as elements
union all
select 'another table' as table, toInt64(0) as rows, toInt64(0) as elements
)
where rows - elements <> 0

DB::Exception: Block structure mismatch in Pipe::unitePipes stream: different number of columns:
table String String(size = 0), rows Int64 Int64(size = 0), elements Int64 Int64(size = 0)
table String String(size = 0), rows Int64 Int64(size = 0), elements Int64 Int64(size = 0), dummy UInt8 UInt8(size = 0) (version 21.5.3.1 (official build))
```
}
                    node_to_column[node] = executeActionForHeader(node, std::move(arguments));
                }
            }
            if (node_to_column[output].column)
                result_columns.push_back(node_to_column[output]);
        }
    }
    if (isInputProjected())
        header.clear();
    else
        header.erase(pos_to_remove);
    Block res;
    for (auto & col : result_columns)
        res.insert(std::move(col));
    for (const auto & item : header)
        res.insert(std::move(item));
    return res;
}
NameSet ActionsDAG::foldActionsByProjection(
    const NameSet & required_columns, const Block & projection_block_for_keys, const String & predicate_column_name, bool add_missing_keys)
{
    std::unordered_set<const Node *> visited_nodes;
    std::unordered_set<std::string_view> visited_index_names;
    std::stack<Node *> stack;
    std::vector<const ColumnWithTypeAndName *> missing_input_from_projection_keys;
    for (const auto & node : index)
    {
        if (required_columns.find(node->result_name) != required_columns.end() || node->result_name == predicate_column_name)
        {