summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/sbe_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/sbe_utils.cpp')
-rw-r--r--src/mongo/db/query/sbe_utils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/query/sbe_utils.cpp b/src/mongo/db/query/sbe_utils.cpp
index 695b2904562..7f327848fc7 100644
--- a/src/mongo/db/query/sbe_utils.cpp
+++ b/src/mongo/db/query/sbe_utils.cpp
@@ -62,9 +62,11 @@ bool isQuerySbeCompatible(const CollectionPtr* collection,
const bool doesNotHaveElemMatchProject = !cq->getProj() || !cq->getProj()->containsElemMatch();
+ const bool isNotInnerSideOfLookup = !(expCtx && expCtx->inLookup);
+
return allExpressionsSupported && isNotCount && doesNotContainMetadataRequirements &&
isQueryNotAgainstTimeseriesCollection && isQueryNotAgainstClusteredCollection &&
doesNotSortOnMetaOrPathWithNumericComponents && isNotOplog && doesNotRequireMatchDetails &&
- doesNotHaveElemMatchProject;
+ doesNotHaveElemMatchProject && isNotInnerSideOfLookup;
}
} // namespace mongo::sbe