MOD-14664 Json Path evaluation - Allow multi-result nodelists in filt…#1542
Open
AvivDavid23 wants to merge 4 commits intomasterfrom
Open
MOD-14664 Json Path evaluation - Allow multi-result nodelists in filt…#1542AvivDavid23 wants to merge 4 commits intomasterfrom
AvivDavid23 wants to merge 4 commits intomasterfrom
Conversation
…er comparisons, Don't evaluate filters on scalar types
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1542 +/- ##
==========================================
- Coverage 75.18% 75.04% -0.15%
==========================================
Files 15 15
Lines 4220 4231 +11
==========================================
+ Hits 3173 3175 +2
- Misses 1047 1056 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This reverts commit b0668a5.
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.
…er comparisons, Don't evaluate filters on scalar types
This also fixes #963 and #968
Note
Medium Risk
Changes JSONPath filter semantics to allow multi-result subpaths to participate in comparisons/regex matching and to ignore filters applied to primitive values; this can alter query results and could impact downstream expectations.
Overview
Aligns filter evaluation with RFC 9535 by introducing a
NodeListterm result for non-singular subpaths (e.g.@.*,@..key) and making>,>=,<,<=,==, and=~succeed when any element in the list matches (with!=remaining!(==)).Updates the evaluator to convert multi-match subqueries into
NodeListinstead of treating them as invalid, and stops applying filter selectors to scalar nodes (arrays/objects only). Expands/adjusts tests to cover wildcard/recursive-descent filter subpaths, regex with NodeLists, and to ensure recursive-descent filtering does not emit duplicate scalar matches.Reviewed by Cursor Bugbot for commit df6b7cf. Bugbot is set up for automated code reviews on this repo. Configure here.