diff options
author | Hana Pearlman <hana.pearlman@mongodb.com> | 2021-11-12 15:41:28 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-12 17:04:17 +0000 |
commit | 0f0831e128283ccb09770613c8ef0cf430599f91 (patch) | |
tree | 0f65f2ac09ada2be2faef182c22248cb951793ca /src/mongo/db/query/index_bounds_builder.h | |
parent | 88b2f80d3807c01e6aadeb4a49d86b392f6146ac (diff) | |
download | mongo-0f0831e128283ccb09770613c8ef0cf430599f91.tar.gz |
SERVER-60010: Cover null and empty array queries with multikey index where possible
Diffstat (limited to 'src/mongo/db/query/index_bounds_builder.h')
-rw-r--r-- | src/mongo/db/query/index_bounds_builder.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/query/index_bounds_builder.h b/src/mongo/db/query/index_bounds_builder.h index 67205d64e7a..c140a151b46 100644 --- a/src/mongo/db/query/index_bounds_builder.h +++ b/src/mongo/db/query/index_bounds_builder.h @@ -46,6 +46,7 @@ class IndexBoundsBuilder { public: static const Interval kUndefinedPointInterval; static const Interval kNullPointInterval; + static const Interval kEmptyArrayPointInterval; /** * Describes various degrees of precision with which predicates can be evaluated based @@ -218,6 +219,12 @@ public: static bool isNullInterval(const OrderedIntervalList& oil); /** + * Returns 'true' if the ordered intervals 'oil' represent a strict equality predicate matching + * null and the empty list. Returns 'false' otherwise. + */ + static bool isNullAndEmptyArrayInterval(const OrderedIntervalList& oil); + + /** * Appends the startKey and endKey of the given "all values" 'interval' (which is either * [MinKey, MaxKey] or [MaxKey, MinKey] interval) to the 'startBob' and 'endBob' respectively, * handling inclusivity of each bound through the relevant '*KeyInclusive' parameter. |