[SERVER-26093] Remove old BSONElement comparator objects in favor of BSONElement::ComparatorInterface Created: 13/Sep/16  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-24508 Make BSONObj/BSONElement and Document... Closed
Assigned Teams:
Query Execution
Participants:

 Description   

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.

Generated at Thu Feb 08 04:11:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.