| 50 | } |
| 51 | |
| 52 | void 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 | |
| 75 | void ProjectionPushDownOptimizer::visitExtend(LogicalOperator* op) { |
| 76 | auto& extend = op->cast<LogicalExtend>(); |
nothing calls this directly
no test coverage detected