Add $setWindowFields sortBy validation corner case tests - #717
Merged
eerxuan merged 1 commit intoAug 11, 2026
Merged
Conversation
Add tests for sortBy-related edge cases in $setWindowFields:
- Range window with sortBy: null (treated as omitted, rejected)
- Range window with sortBy: {} (no sort fields, rejected)
- Time-range window with fractional bounds (must be integers)
- Time-range window with single fractional bound
- Bounded documents window with sortBy: null (rejected)
Update TEST_COVERAGE.md to document these requirements.
Signed-off-by: Cassie-2025 <Cassie-2025@users.noreply.github.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage, docs); effort from diff stats (149+3 LOC, 4 files); LLM: Adds corner-case validation tests for $setWindowFields sortBy and updates TEST_COVERAGE.md; purely additive test coverage with no functional or schema changes. If a label is wrong, remove it manually and ping |
eerxuan
approved these changes
Aug 11, 2026
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.
Summary
sortBy-related corner cases in$setWindowFieldsstage validation:sortBy: null(treated as omitted, rejected with error 5339902)sortBy: {}(empty object, no sort fields, rejected with error 5339902)[-1.5, 1.5]— must be integers, rejected withFAILED_TO_PARSE_ERROR)sortBy: null(rejected with error 5339901)TEST_COVERAGE.mdto document these requirements forsortBy,window.range, andwindow.unitTest plan
setWindowFields/pass against MongoDB 8.2.4 (port 27018)