summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
authorAlexander Ignatyev <alexander.ignatyev@mongodb.com>2022-04-27 12:27:28 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-05 21:21:13 +0000
commit3b505f1957c98f73423ffbb4371ea7c3f64fc98c (patch)
tree229208d43a089e22c0185041254a52e4d04c3271 /src/mongo/db/query
parentf32cf4f2d0474727c58c49943f212e83c51cf6eb (diff)
downloadmongo-3b505f1957c98f73423ffbb4371ea7c3f64fc98c.tar.gz
SERVER-65345 Check if CanonicalQuery has pushed down stages
(cherry picked from commit 8aa42af0644b93e794db1b824238c4b2ab203d25)
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/canonical_query.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/query/canonical_query.cpp b/src/mongo/db/query/canonical_query.cpp
index f3d5c53c483..865cd10b245 100644
--- a/src/mongo/db/query/canonical_query.cpp
+++ b/src/mongo/db/query/canonical_query.cpp
@@ -540,8 +540,10 @@ std::string CanonicalQuery::toStringShort() const {
}
CanonicalQuery::QueryShapeString CanonicalQuery::encodeKey() const {
+ // TODO SERVER-61507: remove '_pipeline.empty()' check. Canonical queries with pushed down
+ // $group/$lookup stages are not SBE-compatible until SERVER-61507 is complete.
return (feature_flags::gFeatureFlagSbePlanCache.isEnabledAndIgnoreFCV() &&
- !_forceClassicEngine && _sbeCompatible)
+ !_forceClassicEngine && _sbeCompatible && _pipeline.empty())
? canonical_query_encoder::encodeSBE(*this)
: canonical_query_encoder::encode(*this);
}