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

Method visitPathPropertyProbe

src/optimizer/projection_push_down_optimizer.cpp:52–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void ProjectionPushDownOptimizer::visitPathPropertyProbe(LogicalOperator* op) {
53 auto& pathPropertyProbe = op->cast<LogicalPathPropertyProbe>();
54 auto child = pathPropertyProbe.getChild(0);
55 DASSERT(child->getOperatorType() == LogicalOperatorType::RECURSIVE_EXTEND);
56 if (nodeOrRelInUse.contains(pathPropertyProbe.getRel())) {
57 return; // Path is needed
58 }
59 // Path is not needed
60 pathPropertyProbe.setJoinType(planner::RecursiveJoinType::TRACK_NONE);
61 auto extend = child->ptrCast<LogicalRecursiveExtend>();
62 auto functionName = extend->getFunction().getFunctionName();
63 if (functionName == VarLenJoinsFunction::name) {
64 extend->getBindDataUnsafe().writePath = false;
65 } else if (functionName == SingleSPPathsFunction::name) {
66 extend->setFunction(SingleSPDestinationsFunction::getAlgorithm());
67 } else if (functionName == AllSPPathsFunction::name) {
68 extend->setFunction(AllSPDestinationsFunction::getAlgorithm());
69 } else if (functionName == WeightedSPPathsFunction::name) {
70 extend->setFunction(WeightedSPDestinationsFunction::getAlgorithm());
71 }
72 extend->setResultColumns(extend->getFunction().getResultColumns(extend->getBindData()));
73}
74
75void ProjectionPushDownOptimizer::visitExtend(LogicalOperator* op) {
76 auto& extend = op->cast<LogicalExtend>();

Callers

nothing calls this directly

Calls 10

setJoinTypeMethod · 0.80
setFunctionMethod · 0.80
setResultColumnsMethod · 0.80
getChildMethod · 0.45
containsMethod · 0.45
getRelMethod · 0.45
getFunctionNameMethod · 0.45
getFunctionMethod · 0.45
getResultColumnsMethod · 0.45
getBindDataMethod · 0.45

Tested by

no test coverage detected