Skip to content

Add test case for aggregation $add operator - #99

Merged
noisersup merged 4 commits into
OpenDocDB:mainfrom
noisersup:test-aggregation-operator-add
Jun 16, 2025
Merged

noisersup merged 4 commits into
OpenDocDB:mainfrom
noisersup:test-aggregation-operator-add

Conversation

@noisersup

@noisersup noisersup commented Jun 9, 2025 •

Copy link
Copy Markdown
Collaborator

No description provided.

@noisersup noisersup self-assigned this Jun 9, 2025
@noisersup
noisersup marked this pull request as ready for review June 9, 2025 15:22
Copilot AI review requested due to automatic review settings June 9, 2025 15:22
@noisersup
noisersup requested a review from AlekSi as a code owner June 9, 2025 15:22
@noisersup
noisersup enabled auto-merge (squash) June 9, 2025 15:22
@noisersup
noisersup requested a review from chilagrow June 9, 2025 15:22

This comment was marked as outdated.

chilagrow
chilagrow previously approved these changes Jun 10, 2025

@AlekSi AlekSi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output files were not comitted

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds comprehensive test cases for the aggregation $add operator, including a JSON specification and corresponding mongosh request/response scripts.

  • Introduces add.json to define $add behavior across various BSON types.
  • Provides a simple.request.js script to run the aggregation in mongosh.
  • Supplies a simple.response.js script 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)

Comment thread cts-mongosh/aggregation/operators/add/simple.response.js
Comment thread cts-mongosh/aggregation/operators/add/simple.request.js
@noisersup
noisersup merged commit 301093b into OpenDocDB:main Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants