Merged
Conversation
Add parametrized test cases for the $match aggregation stage, organized into files by property group: - test_match_core.py: null/missing, equality, predicates, empty/large - test_match_query_operators.py: one representative per query category - test_match_stage_position.py: pipeline position and $text first-stage - test_match_errors.py: argument validation and restricted operators Replace test_match_stage.py with test_smoke_match.py. Add StageTestCase dataclass and new error codes used by the tests. Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
vic-tsang
reviewed
Apr 8, 2026
eerxuan
reviewed
Apr 9, 2026
Collaborator
eerxuan
left a comment
There was a problem hiding this comment.
The coverage is overall pretty good. We need to think about how to prevent duplicate testing.
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Move tests that combine $match with other stages ($project, $group, $replaceRoot) to stages/test_stages_position_match.py per FOLDER_STRUCTURE.md rule that integration tests of same-level features belong in the parent folder. Rename remaining pure $match tests to test_match_pipeline_semantics.py. Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Merged
eerxuan
approved these changes
Apr 14, 2026
eerxuan
requested changes
Apr 14, 2026
Collaborator
eerxuan
left a comment
There was a problem hiding this comment.
Please fix CI failures.
Collaborator
Author
No fixes needed, just waiting on #73 |
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
manojnks
approved these changes
Apr 15, 2026
|
Please fix CI failures. |
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
Collaborator
Author
Now that #73 is merged, I merged from upstream and the failures are resolved. |
manojnks
approved these changes
Apr 15, 2026
Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
eerxuan
approved these changes
Apr 16, 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.
This change adds test cases for the
$matchaggregation stage, organized into files by property group:test_match_core.py: null/missing field matching, core equality/ordering, predicate semantics, empty predicates, large predicatestest_match_query_operators.py: one representative per query operator category (comparison, logical, element, evaluation, array, bitwise, geospatial)test_match_stage_position.py: pipeline position behavior and$textfirst-stagetest_match_errors.py: argument validation (non-object types) and restricted operatorsPlease note the tests are not intended to exhaustively cover things like BSON equality or other properties that would be thoroughly tested as part of separate query testing.
I also replaced
test_match_stage.pywithtest_smoke_match.py(I think this overlaps with #64) since all of the existing cases were duplicated with the expanded coverage.As part of this change, I've introduced a
StageTestCasedataclass for pipeline stage tests, which should be reusable for other aggregation stage tests.Depends on
#65, #66, #67, #73. Until those changes are merged, I expect any tests run on this branch to fail.Ref: #34