summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_shape.h
diff options
context:
space:
mode:
authorWill Buerger <will.buerger@mongodb.com>2023-04-27 18:47:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-27 19:24:04 +0000
commit26a441e07f3885dc8b3d9ef9b564eb4f5143bded (patch)
tree098f7c5202acd884af101dafa0bd401119b89c8c /src/mongo/db/query/query_shape.h
parent83bbc152b713cbf78bbe97bd60fb1dda95f109e4 (diff)
downloadmongo-26a441e07f3885dc8b3d9ef9b564eb4f5143bded.tar.gz
SERVER-76367: Abstract request-specific shapifying logic into RequestShapifiers
Diffstat (limited to 'src/mongo/db/query/query_shape.h')
-rw-r--r--src/mongo/db/query/query_shape.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mongo/db/query/query_shape.h b/src/mongo/db/query/query_shape.h
index 4576739d671..e27b4795a29 100644
--- a/src/mongo/db/query/query_shape.h
+++ b/src/mongo/db/query/query_shape.h
@@ -30,6 +30,8 @@
#pragma once
#include "mongo/db/matcher/expression.h"
+#include "mongo/db/pipeline/aggregate_command_gen.h"
+#include "mongo/db/query/find_command_gen.h"
#include "mongo/db/query/query_request_helper.h"
namespace mongo::query_shape {
@@ -59,12 +61,15 @@ BSONObj representativePredicateShape(
const MatchExpression* predicate,
std::function<std::string(StringData)> identifierRedactionPolicy);
-BSONObj sortShape(const BSONObj& sortSpec,
- const boost::intrusive_ptr<ExpressionContext>& expCtx,
- const SerializationOptions& opts);
+BSONObj extractSortShape(const BSONObj& sortSpec,
+ const boost::intrusive_ptr<ExpressionContext>& expCtx,
+ const SerializationOptions& opts);
BSONObj extractQueryShape(const FindCommandRequest& findCommand,
const SerializationOptions& opts,
const boost::intrusive_ptr<ExpressionContext>& expCtx);
-
+BSONObj extractQueryShape(const AggregateCommandRequest& aggregateCommand,
+ const std::vector<BSONObj>& serializedPipeline,
+ const SerializationOptions& opts,
+ const boost::intrusive_ptr<ExpressionContext>& expCtx);
} // namespace mongo::query_shape