Repository navigation
feat(firestore): pipeline window functions - #9437
Open
MarkDuckworth wants to merge 10 commits into
Open
MarkDuckworth wants to merge 10 commits into
MarkDuckworth wants to merge 10 commits into
Conversation
- Simplify window partition mapping with fieldOrExpression helper - Replace WindowFunction._create factory with constructor - Use _alias and _windowFunction consistently - Remove references to SQL and MongoDB in documentation - Remove 'Today' from backend constraint documentation - Enable window aggregators system test suite against Nightly
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for window functions in Firestore pipelines, adding the 'addWindowFields' stage, 'WindowFunction' and 'AliasedWindowFunction' classes, and ranking functions such as 'rank', 'denseRank', and 'rowNumber'. The feedback focuses on improving robustness against 'null' values across various window specification properties (such as 'frame', 'unit', 'window', 'sort', 'documents', and 'range') by replacing strict 'undefined' checks with loose nullish checks ('== null'), as well as adding defensive checks for missing or invalid inputs in constructors and stage options.
- Keep AliasedWindowFunction consistent with AliasedAggregate (internal _windowFunction/_alias). - Document that 'current' is peer-inclusive in range frames and positional in documents frames. - Add system tests for tied peers in range vs documents frames, string and multi-key range sorts, and fractional range offsets. - Clean up test comments and update the API report.
…arkduckworth/window-functions
…gate comprehensive tests
MarkDuckworth
marked this pull request as ready for review
October 23, 2026 21:46
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.