MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / intersect

Function intersect

src/planner/join_order/join_tree_constructor.cpp:36–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36static 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
48std::shared_ptr<NodeExpression> getIntersectNode(const QueryGraph& queryGraph,
49 const std::vector<SubqueryGraph>& buildSubgraphs) {

Callers 1

getIntersectNodeFunction · 0.85

Calls 4

beginMethod · 0.45
endMethod · 0.45
containsMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected