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

Function getIntersectNode

src/planner/join_order/join_tree_constructor.cpp:48–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48std::shared_ptr<NodeExpression> getIntersectNode(const QueryGraph& queryGraph,
49 const std::vector<SubqueryGraph>& buildSubgraphs) {
50 auto candidates = buildSubgraphs[0].getNbrNodeIndices();
51 for (auto i = 1u; i < buildSubgraphs.size(); ++i) {
52 candidates = intersect(candidates, buildSubgraphs[i].getNbrNodeIndices());
53 }
54 if (candidates.size() != 1) {
55 throw BinderException("Cannot resolve join condition for multi-way join.");
56 }
57 return queryGraph.getQueryNode(candidates[0]);
58}
59
60JoinTreeConstructor::IntermediateResult JoinTreeConstructor::constructTreeNode(
61 std::shared_ptr<BoundJoinHintNode> hintNode) {

Callers 1

constructTreeNodeMethod · 0.85

Calls 4

intersectFunction · 0.85
getNbrNodeIndicesMethod · 0.80
getQueryNodeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected