diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2013-12-20 17:36:03 -0500 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2014-01-02 11:40:13 -0500 |
commit | e4fe380f5173678720adeefd98b15f87140109e3 (patch) | |
tree | a8373a4222294b7c129d8f8e26240e64729dcb00 /src/mongo/db/exec/and_hash.h | |
parent | 419be507ff3ccafd1a5dcda9a40144ed6fb4901e (diff) | |
download | mongo-e4fe380f5173678720adeefd98b15f87140109e3.tar.gz |
SERVER-10026 and hash preserves order of last child
Diffstat (limited to 'src/mongo/db/exec/and_hash.h')
-rw-r--r-- | src/mongo/db/exec/and_hash.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mongo/db/exec/and_hash.h b/src/mongo/db/exec/and_hash.h index 48a1667c1f8..116db71c928 100644 --- a/src/mongo/db/exec/and_hash.h +++ b/src/mongo/db/exec/and_hash.h @@ -79,19 +79,18 @@ namespace mongo { // The stages we read from. Owned by us. vector<PlanStage*> _children; - // _dataMap is filled out by the first child and probed by subsequent children. + // _dataMap is filled out by the first child and probed by subsequent children. This is the + // hash table that we create by intersecting _children and probe with the last child. typedef unordered_map<DiskLoc, WorkingSetID, DiskLoc::Hasher> DataMap; DataMap _dataMap; // Keeps track of what elements from _dataMap subsequent children have seen. + // Only used while _hashingChildren. typedef unordered_set<DiskLoc, DiskLoc::Hasher> SeenMap; SeenMap _seenMap; - // Iterator over the members of _dataMap that survive. - DataMap::iterator _resultIterator; - - // True if we're still scanning _children for results. - bool _shouldScanChildren; + // True if we're still intersecting _children[0..._children.size()-1]. + bool _hashingChildren; // Which child are we currently working on? size_t _currentChild; |