Skip to content

Commit

Permalink
Expression is stateful to store the result of evaluation, so we can't… (
Browse files Browse the repository at this point in the history
#4190)

* Expression is stateful to store the result of evaluation, so we can't share it inter threads.

* Fix defef nullptr.
  • Loading branch information
Shylock-Hg authored and Sophie-Xie committed Apr 20, 2022
1 parent 25e475f commit d7d0576
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/storage/query/ScanEdgeProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,14 @@ StoragePlan<Cursor> ScanEdgeProcessor::buildPlan(
edges.emplace_back(
std::make_unique<FetchEdgeNode>(context, &edgeContext_, ec.first, &ec.second));
}
auto output = std::make_unique<ScanEdgePropNode>(
context, std::move(edges), enableReadFollower_, limit_, cursors, result, expCtx, filter_);
auto output = std::make_unique<ScanEdgePropNode>(context,
std::move(edges),
enableReadFollower_,
limit_,
cursors,
result,
expCtx,
filter_ == nullptr ? nullptr : filter_->clone());

plan.addNode(std::move(output));
return plan;
Expand Down
11 changes: 9 additions & 2 deletions src/storage/query/ScanVertexProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,15 @@ StoragePlan<Cursor> ScanVertexProcessor::buildPlan(
for (const auto& tc : tagContext_.propContexts_) {
tags.emplace_back(std::make_unique<TagNode>(context, &tagContext_, tc.first, &tc.second));
}
auto output = std::make_unique<ScanVertexPropNode>(
context, std::move(tags), enableReadFollower_, limit_, cursors, result, expCtx, filter_);
auto output =
std::make_unique<ScanVertexPropNode>(context,
std::move(tags),
enableReadFollower_,
limit_,
cursors,
result,
expCtx,
filter_ == nullptr ? nullptr : filter_->clone());

plan.addNode(std::move(output));
return plan;
Expand Down

0 comments on commit d7d0576

Please sign in to comment.