Skip to content

Add $out stage tests#182

Open
alinaliBQ wants to merge 7 commits into
documentdb:mainfrom
alinaliBQ:out
Open

Add $out stage tests#182
alinaliBQ wants to merge 7 commits into
documentdb:mainfrom
alinaliBQ:out

Conversation

@alinaliBQ
Copy link
Copy Markdown
Contributor

@alinaliBQ alinaliBQ commented May 13, 2026

This change adds tests for the $out stage operator.

Add stage operator tests for $out. Tests database $out behavior, output collection, syntax, and expected errors.
Integration tests are in documentdb_tests/compatibility/tests/core/operator/stages/test_stages_combination_out.py

@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels May 13, 2026
@documentdb-triage-tool
Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, enhancement
Project fields suggested: Component test-coverage · Priority P2 · Effort XL · Status In Progress
Confidence: 0.90 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (5885+0 LOC, 16 files); LLM: Adds new integration test coverage for the $out stage operator, touching the compatibility tests directory.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

@alinaliBQ alinaliBQ marked this pull request as ready for review May 13, 2026 22:53
@alinaliBQ alinaliBQ requested a review from a team as a code owner May 13, 2026 22:53
@alinaliBQ alinaliBQ changed the title Add $out accumulator tests Add $out stage tests May 13, 2026
@alinaliBQ alinaliBQ force-pushed the out branch 3 times, most recently from e23668c to 8dac8d4 Compare May 14, 2026 23:32
Copy link
Copy Markdown

@SaiPradyumn SaiPradyumn left a comment

Choose a reason for hiding this comment

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

$out + $merge mutual exclusion -> Both are terminal stages. Test confirming [{"$out": "x"}, {"$merge": {...}}] or [{"$merge": ...}, {"$out": "x"}] errors.

@alinaliBQ alinaliBQ force-pushed the out branch 2 times, most recently from 99fb741 to 62090cc Compare May 15, 2026 22:33
@alinaliBQ
Copy link
Copy Markdown
Contributor Author

Pushed one commit for assertFailureCode style. PR is ready

Copy link
Copy Markdown
Contributor Author

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

Will continue addressing comments next week

@alinaliBQ alinaliBQ requested a review from eerxuan May 19, 2026 18:54
@alinaliBQ
Copy link
Copy Markdown
Contributor Author

Addressed all comments

alinaliBQ added 7 commits May 19, 2026 12:23
- add out stage tests. squashed commits to rebase onto main

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>

separate outlier cases

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>

separate outlier cases

Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
"db_digits_only",
docs=[{"_id": 1}],
target_coll="target",
target_db="123",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Avoid using the hard coded db names also, otherwise no guarantee there's no duplicate. dropDatabase may affect other tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility test Compatibility test related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants