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

Remove old BSONElement comparator objects in favor of BSONElement::ComparatorInterface

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Query Execution

      As part of the collation project, SERVER-24508 introduced BSONElement::ComparatorInterface. This new interface can be used to compare or hash BSONElements in a way that respects a collator.

      The codebase still contains a few older comparator objects that can be used to make comparisons between BSONElements. These are inferior because they do not support comparing with respect to a collation. They should be deleted, and callers should be ported to use the BSONElement::ComparatorInterface. Specifically, we should do the following:

      • Remove BSONElementCmpWithoutField.
      • Update the BSONElementSet and BSONElementMSet type aliases to use BSONElement::ComparatorInterface.
      • Update BSONObjIteratorSorted to use BSONElement::ComparatorInterface.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: