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

Allow ranking-style window functions over a compound set of sortBy fields

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None

      Description

      Ranking-style functions are currently only allowed with single-field sortBy specs, since the implementation re-uses existing accumulator machinery under the hood which operates over single values at a time.

      One potential workaround is to prepend an $addFields stage that places the compound set of fields into their own sub-object, then applying the window function rank on that new object.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-query-optimization Backlog - Query Optimization
              Reporter:
              nicholas.zolnierz Nicholas Zolnierz
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: