[SERVER-4675] QueryPattern does not consider type bracketing Created: 13/Jan/12  Updated: 10/Dec/14  Resolved: 09/Dec/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Aaron Staple Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: query_triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

We have a QueryPattern class that categorizes the constraints for the fields of a query. The current categories are Equality, UpperBound, LowerBound, and UpperAndLowerBound. A constraint is determined to be an UpperBound constraint if the maximum matching BSONElement is not MaxKey but the minimum matching BSONElement is MinKey, and corresponding rules determine the remaining inequality bound categories.

We also have a type bracketing policy for some query operators, where matches must be the same canonical type as the query value. For example, in the query {a:{$lt:5}} the smallest matching BSONElement is the smallest number we can represent rather than MinKey. This means that $lt:5 will mapped to the bound category UpperAndLowerBound because of the way its index range is bounded on both sides. We might want classify such cases as UpperBound instead, since the lower bound is created by type bracketing rather than an explicit query constraint.



 Comments   
Comment by auto [ 19/Jan/12 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-4675 descriptive test
Branch: master
https://github.com/mongodb/mongo/commit/446accecc4c9f13fb83d952f8989273ca95d30b1

Generated at Thu Feb 08 03:06:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.