Add $minN array element tests for null filtering and n validation#651
Open
andavag wants to merge 3 commits into
Open
Add $minN array element tests for null filtering and n validation#651andavag wants to merge 3 commits into
andavag wants to merge 3 commits into
Conversation
Signed-off-by: Andranik Avagyan <ando.avagyan.2015@gmail.com>
Add minN array element compatibility tests
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage, test-framework); effort from diff stats (76+0 LOC, 3 files); LLM failed: Invalid response body while trying to fetch https://api.anthropic.com/v1/messages: Premature close If a label is wrong, remove it manually and ping |
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.
What does this PR do?
Adds second-pass compatibility coverage for the
$minNarray expression operator.This PR adds tests for:
nullvalues from$minNarray inputnis larger than the number of usable valuesn: 0input with the expected MongoDB error codeWhy was this PR needed?
Issue #201 asks for additional
$minNarray expression compatibility coverage beyond the existing smoke test. The existing test confirms the basic happy path, but it does not cover edge behavior such as null handling or validation of invalidnvalues.These tests help document expected MongoDB-compatible behavior and protect against future regressions.
How did you test it?
Focused tests passed against local MongoDB:
python -m pytest documentdb_tests/compatibility/tests/core/operator/expressions/array/minN-array-element/test_minN-array-element_null_filtering.py documentdb_tests/compatibility/tests/core/operator/expressions/array/minN-array-element/test_minN-array-element_n_validation.py --connection-string "mongodb://localhost:27017/?serverSelectionTimeoutMS=2000" --engine-name mongodb