| 34 | } |
| 35 | |
| 36 | static std::vector<common::idx_t> intersect(std::vector<common::idx_t> left, |
| 37 | std::vector<common::idx_t> right) { |
| 38 | std::vector<common::idx_t> result; |
| 39 | auto set = std::unordered_set<common::idx_t>{right.begin(), right.end()}; |
| 40 | for (auto idx : left) { |
| 41 | if (set.contains(idx)) { |
| 42 | result.push_back(idx); |
| 43 | } |
| 44 | } |
| 45 | return result; |
| 46 | } |
| 47 | |
| 48 | std::shared_ptr<NodeExpression> getIntersectNode(const QueryGraph& queryGraph, |
| 49 | const std::vector<SubqueryGraph>& buildSubgraphs) { |
no test coverage detected