diff options
author | Ian Boros <ian.boros@10gen.com> | 2018-09-06 16:39:53 -0400 |
---|---|---|
committer | Ian Boros <ian.boros@10gen.com> | 2018-09-20 16:26:20 -0400 |
commit | 5ed54bec92fc15009877e2d579fe59785bffdde7 (patch) | |
tree | f190e99159e98dde1d5f0d13f457c4ec2c1b12f1 /src/mongo/db/query/planner_ixselect.h | |
parent | 64672e68a25e1c4c53a9e1e974036b02fdda2cc5 (diff) | |
download | mongo-5ed54bec92fc15009877e2d579fe59785bffdde7.tar.gz |
SERVER-36731 Ban object inequality and $in with unsupported values when using allPaths indexes
Diffstat (limited to 'src/mongo/db/query/planner_ixselect.h')
-rw-r--r-- | src/mongo/db/query/planner_ixselect.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/query/planner_ixselect.h b/src/mongo/db/query/planner_ixselect.h index e21e88b838a..01123e652b8 100644 --- a/src/mongo/db/query/planner_ixselect.h +++ b/src/mongo/db/query/planner_ixselect.h @@ -151,6 +151,17 @@ public: static std::vector<IndexEntry> expandIndexes(const stdx::unordered_set<std::string>& fields, const std::vector<IndexEntry>& relevantIndices); + /** + * Check if this match expression is a leaf and is supported by an allPaths index. + */ + static bool nodeIsSupportedByAllPathsIndex(const MatchExpression* queryExpr); + + /* + * Return true if the given match expression can use a sparse index, false otherwise. This will + * not traverse the children of the given match expression. + */ + static bool nodeIsSupportedBySparseIndex(const MatchExpression* queryExpr, bool isInElemMatch); + private: /** * Used to keep track of if any $elemMatch predicates were encountered when walking a |