
```
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))
```
{
    ConjunctionNodes conjunction;
    std::unordered_set<const ActionsDAG::Node *> allowed;
    std::unordered_set<const ActionsDAG::Node *> rejected;
    struct Frame
    {
        const ActionsDAG::Node * node = nullptr;
        bool is_predicate = false;
        size_t next_child_to_visit = 0;
        size_t num_allowed_children = 0;
    };
    std::stack<Frame> stack;
    std::unordered_set<const ActionsDAG::Node *> visited_nodes;
    stack.push(Frame{.node = predicate, .is_predicate = true});
    visited_nodes.insert(predicate);
    while (!stack.empty())
    {
        auto & cur = stack.top();
        bool is_conjunction = cur.is_predicate
                                && cur.node->type == ActionsDAG::ActionType::FUNCTION
                                && cur.node->function_base->getName() == "and";
        
        while (cur.next_child_to_visit < cur.node->children.size())
        {
            const auto * child = cur.node->children[cur.next_child_to_visit];