[SERVER-53979] Build simple end-to-end window function stage execution Created: 22/Jan/21  Updated: 29/Oct/23  Resolved: 09/Feb/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Ted Tuckman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Query Optimization 2021-02-22
Participants:

 Description   

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



 Comments   
Comment by Githook User [ 09/Feb/21 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-53979 Add sum accumulator to window function stage
Branch: master
https://github.com/mongodb/mongo/commit/ea12e9bed79e735518f20541ae765ff8b693517b

Comment by Githook User [ 09/Feb/21 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-53979 Add sum accumulator to window function stage
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/40261a11d1a3fcb23973582d3e09fa79ec107770

Generated at Thu Feb 08 05:32:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.