Skip to content

Commit

Permalink
fix join-order s.t. precomputation of service works again. (#1661)
Browse files Browse the repository at this point in the history
This fixes #1659, an issue introduced in #1556 that made the precomputation of a `SERVICE` sibling in `JOIN` operations impossible.
  • Loading branch information
UNEXENU authored Dec 6, 2024
1 parent 9d9bab0 commit c76f24b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/engine/Join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ ProtoResult Join::computeResult(bool requestLaziness) {
return createEmptyResult();
}

// If one of the RootOperations is a Service, precompute the result of its
// sibling.
Service::precomputeSiblingResult(_left->getRootOperation(),
_right->getRootOperation(), false,
requestLaziness);

// Always materialize results that meet one of the following criteria:
// * They are already present in the cache
// * Their result is small
Expand Down Expand Up @@ -195,11 +201,6 @@ ProtoResult Join::computeResult(bool requestLaziness) {
}
}

// If one of the RootOperations is a Service, precompute the result of its
// sibling.
Service::precomputeSiblingResult(_left->getRootOperation(),
_right->getRootOperation(), false,
requestLaziness);
std::shared_ptr<const Result> leftRes =
leftResIfCached ? leftResIfCached : _left->getResult(true);
checkCancellation();
Expand Down

0 comments on commit c76f24b

Please sign in to comment.