diff options
author | Ben Shteinfeld <ben.shteinfeld@mongodb.com> | 2022-12-27 18:38:00 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-05 20:46:43 +0000 |
commit | 4350dacd31d3fe1adf51a07cf3d59406fa2351e3 (patch) | |
tree | 694928e49f4016e2838bc1f3bd1dbefa7a2cedee /src/mongo/s/query/cqf_utils.cpp | |
parent | af1ad78010f1396ad09f2f96e16705598f45a54b (diff) | |
download | mongo-4350dacd31d3fe1adf51a07cf3d59406fa2351e3.tar.gz |
SERVER-71943 Move ABT translation to new visitor mechanism
Diffstat (limited to 'src/mongo/s/query/cqf_utils.cpp')
-rw-r--r-- | src/mongo/s/query/cqf_utils.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/s/query/cqf_utils.cpp b/src/mongo/s/query/cqf_utils.cpp index 6ccd8b7273e..680e8d14767 100644 --- a/src/mongo/s/query/cqf_utils.cpp +++ b/src/mongo/s/query/cqf_utils.cpp @@ -27,6 +27,7 @@ * it in the license file. */ +#include "mongo/db/pipeline/abt/document_source_visitor.h" #include "mongo/db/pipeline/visitors/document_source_visitor_registry_mongos.h" #include "mongo/db/query/cqf_command_utils.h" #include "mongo/db/service_context.h" @@ -43,4 +44,14 @@ const ServiceContext::ConstructorActionRegisterer abtUnsupportedRegisterer{ registerMongosVisitor<ABTUnsupportedDocumentSourceVisitorContext>(service); }}; +void visit(ABTDocumentSourceTranslationVisitorContext* ctx, const DocumentSourceMergeCursors&) { + uasserted(ErrorCodes::InternalErrorNotSupported, + "DocumentSourceMergeCursors is not supported in CQF"); +} + +const ServiceContext::ConstructorActionRegisterer abtTranslationRegisterer{ + "ABTTranslationRegistererMongoS", [](ServiceContext* service) { + registerMongosVisitor<ABTDocumentSourceTranslationVisitorContext>(service); + }}; + } // namespace mongo::optimizer |