Skip to content

Commit

Permalink
Rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shylock-Hg committed Jun 7, 2022
1 parent 39fa479 commit a018dc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/graph/executor/Executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ Executor *Executor::makeExecutor(QueryContext *qctx, const PlanNode *node) {
return pool->makeAndAdd<AlterSpaceExecutor>(node, qctx);
}
case PlanNode::Kind::kShortestPath: {
return pool->add(new ShortestPathExecutor(node, qctx));
return pool->makeAndAdd<ShortestPathExecutor>(node, qctx);
}
case PlanNode::Kind::kUnknown: {
LOG(FATAL) << "Unknown plan node kind " << static_cast<int32_t>(node->kind());
Expand Down
3 changes: 2 additions & 1 deletion src/graph/planner/plan/Algo.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class ShortestPath final : public SingleInputNode {
PlanNode* node,
GraphSpaceID space,
bool singleShortest) {
return qctx->objPool()->add(new ShortestPath(qctx, node, space, singleShortest));
return qctx->objPool()->makeAndAdd<ShortestPath>(qctx, node, space, singleShortest);
}

PlanNode* clone() const override;
Expand Down Expand Up @@ -214,6 +214,7 @@ class ShortestPath final : public SingleInputNode {
}

private:
friend ObjectPool;
ShortestPath(QueryContext* qctx, PlanNode* node, GraphSpaceID space, bool singleShortest)
: SingleInputNode(qctx, Kind::kShortestPath, node),
space_(space),
Expand Down

0 comments on commit a018dc5

Please sign in to comment.