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

Build simple end-to-end window function stage execution

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Query Optimization 2021-02-22

      The primary goal of this ticket is to provide an extremely limited proof of concept for the window function stage. The only supported function will be $sum over the window bounds ["unbounded", "current"], as this allows us to completely re-use the existing AccumulatorState machinery. Also, partitioning will not need to be supported.

      The subtasks we identified would be:

      1. Translate AST-like structures to relevant AccumulatorState (dependency on SERVER-53399)
      2. Fail to parse on anything other than the function/window described above.
      3. Implement stage getNext() logic to loop through 'output' fields, accumulate value, and project to the output document. May be able to use MutableDocument::setNestedField instead of the full-blown $addFields executor.
      4. Verify functionality through mqlrun

            Assignee:
            ted.tuckman@mongodb.com Ted Tuckman
            Reporter:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: