Repository navigation
Add test case for aggregation $add operator - #99
Merged
noisersup merged 4 commits intoJun 16, 2025
Merged
Conversation
noisersup
marked this pull request as ready for review
June 9, 2025 15:22
noisersup
enabled auto-merge (squash)
June 9, 2025 15:22
chilagrow
previously approved these changes
Jun 10, 2025
AlekSi
reviewed
Jun 11, 2025
AlekSi
left a comment
Contributor
There was a problem hiding this comment.
Output files were not comitted
There was a problem hiding this comment.
Pull Request Overview
Adds comprehensive test cases for the aggregation $add operator, including a JSON specification and corresponding mongosh request/response scripts.
- Introduces
add.jsonto define$addbehavior across various BSON types. - Provides a
simple.request.jsscript to run the aggregation in mongosh. - Supplies a
simple.response.jsscript with expected results (some values appear mismatched).
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cts/aggregation/operators/add.json | New JSON spec covering $add with integers, decimals, dates, etc. |
| cts-mongosh/aggregation/operators/add/simple.request.js | Mongosh script invoking the $add aggregation pipeline. |
| cts-mongosh/aggregation/operators/add/simple.response.js | Expected shell response; contains inconsistencies in some value cases. |
Comments suppressed due to low confidence (1)
cts-mongosh/aggregation/operators/add/simple.response.js:70
- The Double value for 'double-max' is incorrect; it should reflect the $add result of Number.MAX_VALUE + 10, which remains approximately 1.7976931348623157e308. Please update this literal to Double(1.7976931348623157e308).
"sum": Double(179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
chilagrow
approved these changes
Jun 12, 2025
AlekSi
approved these changes
Jun 16, 2025
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.