From c76f24b64627189fd1e66930b62f8b4df9201694 Mon Sep 17 00:00:00 2001 From: unex <63149623+UNEXENU@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:51:30 +0100 Subject: [PATCH] fix join-order s.t. precomputation of service works again. (#1661) This fixes #1659, an issue introduced in #1556 that made the precomputation of a `SERVICE` sibling in `JOIN` operations impossible. --- src/engine/Join.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/Join.cpp b/src/engine/Join.cpp index d3c5370e16..93557d06e5 100644 --- a/src/engine/Join.cpp +++ b/src/engine/Join.cpp @@ -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 @@ -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 leftRes = leftResIfCached ? leftResIfCached : _left->getResult(true); checkCancellation();