diff options
author | Rui Liu <lriuui0x0@gmail.com> | 2023-03-24 16:11:42 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-24 19:40:09 +0000 |
commit | 3bdce675b6abf11284457ebb88ae5ce5e83cbfc6 (patch) | |
tree | 54d53b261a23e65ee8e24870ab28c33a8e1a3aa6 /src/mongo/db/query/sbe_stage_builder_accumulator_test.cpp | |
parent | 5ebfd6db784e30ac7e1862fc9aee7a2cc4d62e8f (diff) | |
download | mongo-3bdce675b6abf11284457ebb88ae5ce5e83cbfc6.tar.gz |
SERVER-75129 Allow SBE compatibility check to distinguish featureFlagSbeFull
Diffstat (limited to 'src/mongo/db/query/sbe_stage_builder_accumulator_test.cpp')
-rw-r--r-- | src/mongo/db/query/sbe_stage_builder_accumulator_test.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/query/sbe_stage_builder_accumulator_test.cpp b/src/mongo/db/query/sbe_stage_builder_accumulator_test.cpp index d98c96fe8a9..03ce1f424eb 100644 --- a/src/mongo/db/query/sbe_stage_builder_accumulator_test.cpp +++ b/src/mongo/db/query/sbe_stage_builder_accumulator_test.cpp @@ -227,7 +227,7 @@ protected: void runSbeIncompatibleGroupSpecTest(const BSONObj& groupSpec, boost::intrusive_ptr<ExpressionContext>& expCtx) { - expCtx->sbeCompatible = true; + expCtx->sbeCompatibility = SbeCompatibility::fullyCompatible; // When we parse and optimize the 'groupSpec' to build a DocumentSourceGroup, those // accumulation expressions or '_id' expression that are not supported by SBE will flip the // 'sbeCompatible()' flag in the 'groupStage' to false. @@ -235,12 +235,13 @@ protected: auto groupStage = dynamic_cast<DocumentSourceGroup*>(docSrc.get()); ASSERT(groupStage != nullptr); - ASSERT_EQ(false, groupStage->sbeCompatible()) << "group spec: " << groupSpec; + auto sbeCompatible = groupStage->sbeCompatibility() != SbeCompatibility::notCompatible; + ASSERT_EQ(false, sbeCompatible) << "group spec: " << groupSpec; } void runSbeGroupCompatibleFlagTest(const std::vector<BSONObj>& groupSpecs, boost::intrusive_ptr<ExpressionContext>& expCtx) { - expCtx->sbeCompatible = true; + expCtx->sbeCompatibility = SbeCompatibility::fullyCompatible; for (const auto& groupSpec : groupSpecs) { // When we parse and optimize the groupSpec to build the DocumentSourceGroup, those // AccumulationExpressions or _id expression that are not supported by SBE will flip the @@ -264,7 +265,8 @@ protected: sbeGroupCompatible = false; break; } - ASSERT_EQ(sbeGroupCompatible, groupStage->sbeCompatible()) + ASSERT_EQ(sbeGroupCompatible, + groupStage->sbeCompatibility() != SbeCompatibility::notCompatible) << "group spec: " << groupSpec; } } |