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

Make window function $rank/$denseRank consistent with sort order

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Minor Change
    • 151

      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:
            rui.liu@mongodb.com Rui Liu
            Reporter:
            rui.liu@mongodb.com Rui Liu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: