Skip to content

Commit

Permalink
Properly move before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTF committed Feb 10, 2025
1 parent 019e7b0 commit 5d0d58d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine/QueryPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1937,15 +1937,15 @@ std::vector<QueryPlanner::SubtreePlan> QueryPlanner::createJoinCandidates(
if (b.type == SubtreePlan::MINUS) {
SubtreePlan plan = makeSubtreePlan<Minus>(_qec, a._qet, b._qet);
mergeSubtreePlanIds(plan, a, b);
return {plan};
return {std::move(plan)};
}

// OPTIONAL JOINS are not symmetric!
if (b.type == SubtreePlan::OPTIONAL) {
// Join the two optional columns using an optional join
SubtreePlan plan = makeSubtreePlan<OptionalJoin>(_qec, a._qet, b._qet);
mergeSubtreePlanIds(plan, a, b);
return {plan};
return {std::move(plan)};
}

if (auto opt = createJoinWithPathSearch(a, b, jcs)) {
Expand All @@ -1959,7 +1959,7 @@ std::vector<QueryPlanner::SubtreePlan> QueryPlanner::createJoinCandidates(
try {
SubtreePlan plan = makeSubtreePlan<MultiColumnJoin>(_qec, a._qet, b._qet);
mergeSubtreePlanIds(plan, a, b);
return {plan};
return {std::move(plan)};
} catch (const std::exception& e) {
return {};
}
Expand Down

0 comments on commit 5d0d58d

Please sign in to comment.