Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3473

Investigate changes in SERVER-82168: Make window function $rank/$denseRank consistent with sort order

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Tools and Replicator

      Original Downstream Change Summary

      A bug in the $rank/$denseRank implementation has been fixed, so that they are consistent with the sort order.

      Description of Linked Ticket

      Currently, $rank and $denseRank treat null and missing differently, which causes a field to change from null to missing, or vice versa to a rank increment. This is not consistent with $sort behavior, which treats null and missing the same. This causes the rank result to be unstable.

      The SBE implementation currently copies the Classic semantics. When we update the semantics, we should update in both engines.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: