Open
Conversation
Signed-off-by: Victor Tsang <vitsangp@amazon.com>
manojnks
reviewed
Apr 21, 2026
| Tests for $expr argument shapes and expression evaluation. | ||
|
|
||
| Covers valid argument forms (field references, comparison expressions, | ||
| deeply nested operators), system variables ($$ROOT, $$CURRENT, $literal), |
There was a problem hiding this comment.
Should we add $$NOW since its also system var?
| msg="$or mixing regular query and $expr", | ||
| ), | ||
| QueryTestCase( | ||
| id="field_path_through_array", |
There was a problem hiding this comment.
Add a case with $expr with a field path traversing an array whose elements are scalars (not objects), to cover array-flattening behavior.
| msg="$expr with bare $$REMOVE — falsy, no documents match", | ||
| ), | ||
| ] | ||
|
|
There was a problem hiding this comment.
Missing: $expr inside $not, e.g. {"$expr": {"$not": [{"$gt": ["$a", 0]}]}}
| expected=[{"_id": 1, "stats": {"score": 90, "threshold": 80}}], | ||
| msg="$expr comparing nested dotted fields from same document", | ||
| ), | ||
| ] |
There was a problem hiding this comment.
Can you add Decimal128 ↔ int / double cross-type equivalence. Add at least one case like {"$eq": [Decimal128("1.0"), 1]}.
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 PR contains
Ref: