
```
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))
```
{
    NamesAndTypesList result;
    for (const auto & node : index)
        result.emplace_back(node->result_name, node->result_type);
    return result;
}
Names ActionsDAG::getNames() const
{
    Names names;
    names.reserve(index.size());
    for (const auto & node : index)
        names.emplace_back(node->result_name);
    return names;
}
std::string ActionsDAG::dumpNames() const
{
    WriteBufferFromOwnString out;
    for (auto it = nodes.begin(); it != nodes.end(); ++it)
    {
        if (it != nodes.begin())
            out << ", ";
        out << it->result_name;
    }
    return out.str();
}
void ActionsDAG::removeUnusedActions(const NameSet & required_names)