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

Function getScanNodeCandidates

src/optimizer/acc_hash_join_optimizer.cpp:158–174  ·  view source on GitHub ↗

Find all ScanNodeIDs under root which scans parameter nodeID. Note that there might be multiple ScanNodeIDs matches because both node and rel table scans will trigger scanNodeIDs.

Source from the content-addressed store, hash-verified

156// Find all ScanNodeIDs under root which scans parameter nodeID. Note that there might be
157// multiple ScanNodeIDs matches because both node and rel table scans will trigger scanNodeIDs.
158static std::vector<LogicalOperator*> getScanNodeCandidates(const Expression& nodeID,
159 LogicalOperator* root) {
160 std::vector<LogicalOperator*> result;
161 auto collector = LogicalScanNodeTableCollector();
162 collector.collect(root);
163 for (auto& op : collector.getOperators()) {
164 auto& scan = op->constCast<LogicalScanNodeTable>();
165 if (scan.getScanType() != LogicalScanNodeTableType::SCAN) {
166 // Do not apply semi mask to index scan.
167 continue;
168 }
169 if (nodeID.getUniqueName() == scan.getNodeID()->getUniqueName()) {
170 result.push_back(op);
171 }
172 }
173 return result;
174}
175
176static std::vector<LogicalOperator*> getRecursiveExtendInputNodeCandidates(const Expression& nodeID,
177 LogicalOperator* root) {

Callers 3

tryApplySemiMaskFunction · 0.85
visitIntersectMethod · 0.85

Calls 6

collectMethod · 0.80
getScanTypeMethod · 0.80
getUniqueNameMethod · 0.45
getNodeIDMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected