Skip to content

Commit

Permalink
Only check UNION for children
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTF committed Feb 26, 2025
1 parent a5f4fd9 commit a39ca0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/engine/QueryPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,10 @@ bool hasTransitivePathInTree(const Operation& operation) {
if (dynamic_cast<const TransitivePathBase*>(&operation)) {
return true;
}
// Only check `UNION`s for children.
if (!dynamic_cast<const Union*>(&operation)) {
return false;
}
return ql::ranges::any_of(
operation.getChildren(), [](const QueryExecutionTree* child) {
return hasTransitivePathInTree(*child->getRootOperation());
Expand Down

0 comments on commit a39ca0e

Please sign in to comment.