Skip to content

Commit

Permalink
modify loop condition
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed May 5, 2022
1 parent 326b856 commit fe973bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/graph/planner/ngql/SubgraphPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ StatusOr<SubPlan> SubgraphPlanner::nSteps(SubPlan& startVidPlan, const std::stri
auto resultVar = qctx->vctx()->anonVarGen()->getVar();
auto loopSteps = qctx->vctx()->anonVarGen()->getVar();
subgraphCtx_->loopSteps = loopSteps;
auto* subgraph = Subgraph::make(qctx, gn, resultVar, loopSteps, steps.steps() + 1);
uint32_t maxSteps = steps.steps();
if (subgraphCtx_->getEdgeProp || subgraphCtx_->withProp) {
++maxSteps;
}
auto* subgraph = Subgraph::make(qctx, gn, resultVar, loopSteps, maxSteps);
subgraph->setOutputVar(input);
subgraph->setBiDirectEdgeTypes(subgraphCtx_->biDirectEdgeTypes);
subgraph->setColNames({nebula::kVid});
Expand Down

0 comments on commit fe973bf

Please sign in to comment.