Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7643

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
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Developer Tools
    • Not Needed

      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:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: