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

Use getElement in min/max implementation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2023-11-27, QE 2023-12-11

      Currently there is a built-in method for finalize min/max ("finalizeMinMax") which returns the first/last element from a multiset. There is also a built-in method for finalize MinN/MaxN ("finalizeMinNMaxN"), which returns an array with the first/last N elements in a multiset. Instead of having two separate built-ins, we will re-use "finalizeMinNMaxN" for min/max with N=0. Since the "finalizeMinNMaxN" returns an array we will get the element from that array using the "getElement" method.

            Assignee:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Reporter:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: