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

Method constructRelScan

src/planner/join_order/join_tree_constructor.cpp:161–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161JoinTreeConstructor::IntermediateResult JoinTreeConstructor::constructRelScan(
162 std::shared_ptr<binder::Expression> expr) {
163 auto& rel = expr->constCast<RelExpression>();
164 auto relIdx = queryGraph.getQueryRelIdx(rel.getUniqueName());
165 auto emptySubgraph = SubqueryGraph(queryGraph);
166 auto newSubgraph = SubqueryGraph(queryGraph);
167 newSubgraph.addQueryRel(relIdx);
168 auto properties = propertyCollection.getProperties(*expr);
169 auto predicates =
170 Planner::getNewlyMatchedExprs(emptySubgraph, newSubgraph, queryGraphPredicates);
171 auto relScanInfo = NodeRelScanInfo(expr, properties);
172 relScanInfo.predicates = predicates;
173 auto extraInfo = std::make_unique<ExtraScanTreeNodeInfo>();
174 extraInfo->relInfos.push_back(std::move(relScanInfo));
175 auto treeNode = std::make_shared<JoinTreeNode>(TreeNodeType::REL_SCAN, std::move(extraInfo));
176 return {treeNode, newSubgraph};
177}
178
179std::shared_ptr<JoinTreeNode> JoinTreeConstructor::tryConstructNestedLoopJoin(
180 std::vector<std::shared_ptr<NodeExpression>> joinNodes, const JoinTreeNode& leftRoot,

Callers

nothing calls this directly

Calls 7

SubqueryGraphClass · 0.85
NodeRelScanInfoClass · 0.85
getQueryRelIdxMethod · 0.80
getUniqueNameMethod · 0.45
addQueryRelMethod · 0.45
getPropertiesMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected