Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4675

QueryPattern does not consider type bracketing

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: