Skip to content

Commit

Permalink
fix nasty bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ullingerc committed Nov 24, 2024
1 parent 81455d1 commit 12ba6ff
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/engine/QueryPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2477,9 +2477,7 @@ void QueryPlanner::GraphPatternPlanner::visitPathSearch(
if (pathQuery.childGraphPattern_.has_value()) {
candidatesIn = planner_.optimize(&pathQuery.childGraphPattern_.value());
} else {
auto neutralElement = makeExecutionTree<NeutralElementOperation>(qec_);
candidatesIn = {
makeSubtreePlan<PathSearch>(qec_, std::move(neutralElement), config)};
candidatesIn = {makeSubtreePlan<NeutralElementOperation>(qec_)};
}
std::vector<SubtreePlan> candidatesOut;

Expand All @@ -2502,11 +2500,7 @@ void QueryPlanner::GraphPatternPlanner::visitSpatialSearch(
if (spatialQuery.childGraphPattern_.has_value()) {
candidatesIn = planner_.optimize(&spatialQuery.childGraphPattern_.value());
} else {
auto neutralElementLeft = makeExecutionTree<NeutralElementOperation>(qec_);
auto neutralElementRight = makeExecutionTree<NeutralElementOperation>(qec_);
candidatesIn = {makeSubtreePlan<SpatialJoin>(
qec_, std::make_shared<SpatialJoinConfiguration>(config),
std::move(neutralElementLeft), std::move(neutralElementRight))};
candidatesIn = {makeSubtreePlan<NeutralElementOperation>(qec_)};
}
std::vector<SubtreePlan> candidatesOut;

Expand All @@ -2529,7 +2523,7 @@ void QueryPlanner::GraphPatternPlanner::visitSpatialSearch(
candidatesOut.push_back(std::move(plan));
};

if (!spatialQuery.childGraphPattern_.has_value()) {
if (spatialQuery.childGraphPattern_.has_value()) {
// The version using the child graph pattern
addCandidateSpatialJoin(false);
} else {
Expand Down

0 comments on commit 12ba6ff

Please sign in to comment.