diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2018-06-12 13:35:22 +0100 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2018-06-22 04:03:41 +0100 |
commit | c798e34f5479c43da70d5f9f7d4919f16e6dbd50 (patch) | |
tree | fa2e47d9c74a26fa01874c9cc76a13f6dbc31dbe /src/mongo/db/pipeline/dependencies.h | |
parent | 04d8939bd9c6776da8b7effe9c4bcaa20591d88f (diff) | |
download | mongo-c798e34f5479c43da70d5f9f7d4919f16e6dbd50.tar.gz |
SERVER-35329 Package agg projection code for use outside of agg execution
Diffstat (limited to 'src/mongo/db/pipeline/dependencies.h')
-rw-r--r-- | src/mongo/db/pipeline/dependencies.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/dependencies.h b/src/mongo/db/pipeline/dependencies.h index dec5296060f..60bc4990f86 100644 --- a/src/mongo/db/pipeline/dependencies.h +++ b/src/mongo/db/pipeline/dependencies.h @@ -43,6 +43,31 @@ class ParsedDeps; */ struct DepsTracker { /** + * Used by aggregation stages to report whether or not dependency resolution is complete, or + * must continue to the next stage. + */ + enum State { + // The full object and all metadata may be required. + NOT_SUPPORTED = 0x0, + + // Later stages could need either fields or metadata. For example, a $limit stage will pass + // through all fields, and they may or may not be needed by future stages. + SEE_NEXT = 0x1, + + // Later stages won't need more fields from input. For example, an inclusion projection like + // {_id: 1, a: 1} will only output two fields, so future stages cannot possibly depend on + // any other fields. + EXHAUSTIVE_FIELDS = 0x2, + + // Later stages won't need more metadata from input. For example, a $group stage will group + // documents together, discarding their text score and sort keys. + EXHAUSTIVE_META = 0x4, + + // Later stages won't need either fields or metadata. + EXHAUSTIVE_ALL = EXHAUSTIVE_FIELDS | EXHAUSTIVE_META, + }; + + /** * Represents the type of metadata a pipeline might request. */ enum class MetadataType { |