diff options
author | Alya Berciu <alyacarina@gmail.com> | 2021-02-24 16:44:23 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-18 17:37:35 +0000 |
commit | 54a41757d77002b015c7bceca87c59f35e5a564f (patch) | |
tree | 8c29ab5e645e4bcfe0f3bac00844f760388cf213 /src/mongo/db/query/planner_access.h | |
parent | eee4362074775ebd142cfd671dcca312ddc31fe2 (diff) | |
download | mongo-54a41757d77002b015c7bceca87c59f35e5a564f.tar.gz |
SERVER-55065: Cover null queries with index where possible
Diffstat (limited to 'src/mongo/db/query/planner_access.h')
-rw-r--r-- | src/mongo/db/query/planner_access.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/query/planner_access.h b/src/mongo/db/query/planner_access.h index 3c9b03ff4d0..ff01a3fa79d 100644 --- a/src/mongo/db/query/planner_access.h +++ b/src/mongo/db/query/planner_access.h @@ -138,10 +138,12 @@ private: */ struct ScanBuildingState { ScanBuildingState(MatchExpression* theRoot, + const std::vector<IndexEntry>& indexList, bool inArrayOp, - const std::vector<IndexEntry>& indexList) + bool isCoveredNull = false) : root(theRoot), inArrayOperator(inArrayOp), + isCoveredNullQuery(isCoveredNull), indices(indexList), currentScan(nullptr), curChild(0), @@ -174,6 +176,9 @@ private: // Are we inside an array operator such as $elemMatch or $all? bool inArrayOperator; + // Is this a covered null query? + bool isCoveredNullQuery; + // A list of relevant indices which 'root' may be tagged to use. const std::vector<IndexEntry>& indices; |