diff options
Diffstat (limited to 'src/mongo/db/pipeline/document_source.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h index ec95df29d7e..1a4f4a43472 100644 --- a/src/mongo/db/pipeline/document_source.h +++ b/src/mongo/db/pipeline/document_source.h @@ -327,6 +327,22 @@ public: // stages. // +private: + /** + * Attempt to push a match stage from directly ahead of the current stage given by itr to before + * the current stage. Returns whether the optimization was performed. + */ + bool pushMatchBefore(Pipeline::SourceContainer::iterator itr, + Pipeline::SourceContainer* container); + + /** + * Attempt to push a sample stage from directly ahead of the current stage given by itr to before + * the current stage. Returns whether the optimization was performed. + */ + bool pushSampleBefore(Pipeline::SourceContainer::iterator itr, + Pipeline::SourceContainer* container); + +public: /** * The non-virtual public interface for optimization. Attempts to do some generic optimizations * such as pushing $matches as early in the pipeline as possible, then calls out to |