Build simple end-to-end window function stage execution

XMLWordPrintableJSON

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

      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
            Reporter:
            Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: