summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/projection_node.h
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/db/exec/projection_node.h
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/db/exec/projection_node.h')
-rw-r--r--src/mongo/db/exec/projection_node.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/mongo/db/exec/projection_node.h b/src/mongo/db/exec/projection_node.h
index cd744ef4cac..2a587580330 100644
--- a/src/mongo/db/exec/projection_node.h
+++ b/src/mongo/db/exec/projection_node.h
@@ -29,9 +29,8 @@
#pragma once
-#include <list>
-
#include "mongo/db/exec/projection_executor.h"
+
#include "mongo/db/query/projection_policies.h"
namespace mongo::projection_executor {
@@ -103,7 +102,7 @@ public:
/**
* Recursively report all paths that are referenced by this projection.
*/
- void reportProjectedPaths(OrderedPathSet* preservedPaths) const;
+ void reportProjectedPaths(std::set<std::string>* preservedPaths) const;
/**
* Return an optional number, x, which indicates that it is safe to stop reading the document
@@ -120,7 +119,7 @@ public:
* 'renamedPaths'. Each entry in 'renamedPaths' maps from the path's new name to its old name
* prior to application of this projection.
*/
- void reportComputedPaths(OrderedPathSet* computedPaths,
+ void reportComputedPaths(std::set<std::string>* computedPaths,
StringMap<std::string>* renamedPaths) const;
const std::string& getPath() const {
@@ -129,12 +128,10 @@ public:
void optimize();
- Document serialize(boost::optional<ExplainOptions::Verbosity> explain,
- const SerializationOptions& options) const;
+ Document serialize(boost::optional<ExplainOptions::Verbosity> explain) const;
void serialize(boost::optional<ExplainOptions::Verbosity> explain,
- MutableDocument* output,
- const SerializationOptions& options) const;
+ MutableDocument* output) const;
protected:
/**
@@ -163,19 +160,9 @@ protected:
// Writes the given value to the output doc, replacing the existing value of 'field' if present.
virtual void outputProjectedField(StringData field, Value val, MutableDocument* outDoc) const;
- // Used to determine if the node is an inclusion or exclusion node.
- virtual bool isIncluded() const = 0;
-
StringMap<std::unique_ptr<ProjectionNode>> _children;
StringMap<boost::intrusive_ptr<Expression>> _expressions;
-
- // List of the projected fields in the order in which they were specified.
- std::list<std::string> _projectedFields;
-
- // Set of projected fields. Note that the _projectedFields list actually owns the strings, and
- // this StringDataSet simply holds views of those strings.
- StringDataSet _projectedFieldsSet;
-
+ StringSet _projectedFields;
ProjectionPolicies _policies;
std::string _pathToNode;