diff options
author | Davis Haupt <davis.haupt@mongodb.com> | 2023-01-04 18:41:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-04 19:40:43 +0000 |
commit | bd443c34edf399038379a1f131b3842b8ce486b8 (patch) | |
tree | 9ac8453bd67df7237ed86804a3cb3f9eda500af0 /src/mongo/db/exec/sbe | |
parent | 2ecf24a29f7945ef7d6d03acba553e45611409fa (diff) | |
download | mongo-bd443c34edf399038379a1f131b3842b8ce486b8.tar.gz |
SERVER-72303 Add lowering unittest for CoScanNode
Diffstat (limited to 'src/mongo/db/exec/sbe')
-rw-r--r-- | src/mongo/db/exec/sbe/abt/abt_lower_test.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/db/exec/sbe/abt/abt_lower_test.cpp b/src/mongo/db/exec/sbe/abt/abt_lower_test.cpp index f8f02f8d423..378c180c668 100644 --- a/src/mongo/db/exec/sbe/abt/abt_lower_test.cpp +++ b/src/mongo/db/exec/sbe/abt/abt_lower_test.cpp @@ -31,6 +31,7 @@ #include "mongo/bson/timestamp.h" #include "mongo/db/exec/sbe/abt/abt_lower.h" #include "mongo/db/query/optimizer/explain.h" +#include "mongo/db/query/optimizer/node.h" #include "mongo/db/query/optimizer/node_defs.h" #include "mongo/db/query/optimizer/rewrites/const_eval.h" #include "mongo/db/query/optimizer/rewrites/path_lower.h" @@ -71,6 +72,10 @@ protected: std::string stripUUIDs(std::string str) { // UUIDs are printed with a leading '@' character, and in quotes. auto atIndex = str.find('@'); + // If there aren't any UUIDs in the string, return the input. + if (atIndex == std::string::npos) { + return str; + } // Expect a quote after the '@' in the plan. ASSERT_EQUALS('\"', str[atIndex + 1]); // The next character is a quote. Find the close quote. @@ -325,5 +330,12 @@ TEST_F(ABTPlanGeneration, LowerCollationNode) { {{"a", "sortA"}, {"b", "sortB"}}, _node(scanForTest()), "scan0", _nodeMap)), collationNodeProp2)); } + +TEST_F(ABTPlanGeneration, LowerCoScanNode) { + GoldenTestContext ctx(&goldenTestConfig); + ctx.printTestHeader(GoldenTestContext::HeaderFormat::Text); + runNodeVariation(ctx, "CoScan", _node(make<CoScanNode>())); +} + } // namespace } // namespace mongo::optimizer |