Repository navigation
feat(firestore): implement pipeline window functions - #14504
Open
MarkDuckworth wants to merge 9 commits into
Open
MarkDuckworth wants to merge 9 commits into
MarkDuckworth wants to merge 9 commits into
Conversation
- Add AddWindowFields stage and Pipeline.addWindowFields overloads - Add WindowSpec, WindowBound, WindowFunction, and AliasedWindowFunction - Add AggregateFunction.over(WindowSpec) to evaluate aggregates over window frames - Add serialization and proto tests in AddWindowFieldsProtoTest and PipelineProtoTest - Add integration tests in ITPipelineTest with array_agg_distinct enabled against Nightly
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for window functions in the Firestore pipeline API, adding the addWindowFields stage along with supporting classes like WindowSpec, WindowFunction, WindowBound, and AliasedWindowFunction. It also includes extensive unit and integration tests to validate various windowing behaviors such as partitioning, sorting, and framing. A review comment suggests adding an explicit null check in WindowSpec.toBoundaryExpr to prevent potential serialization errors when a null boundary is provided.
- Replace the WindowBound enum with a final class exposing CURRENT/UNBOUNDED constants; remove the WindowSpec.CURRENT/UNBOUNDED aliases. - Remove WindowSpec.partition(FieldPath...) and the getPartition()/getSort() getters. - Document that CURRENT is peer-inclusive in range frames and positional in documents frames. - Add integration tests for tied peers, string and multi-key range sorts, and double range offsets.
…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.