Skip to content

MOD-19578 - fix jsonoath for subsetof ,subsetany and oneof - #1672

Merged
AvivDavid23 merged 2 commits into
masterfrom
tal.ba/bug/json_path_func
Oct 13, 2026
Merged

AvivDavid23 merged 2 commits into
masterfrom
tal.ba/bug/json_path_func

Conversation

@TalBarYakar

@TalBarYakar TalBarYakar commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Note

Low Risk
Extends JSONPath evaluation with new function dispatch only; behavior mirrors existing infix set operators and is covered by new tests.

Overview
Adds callable forms for the set-comparison operators that already worked as filter infix (subsetof, anyof, noneof).

eval_function now registers subsetof, anyof, and noneof with two-argument arity (same as index/append). Wrong arity yields Nothing instead of silently ignoring extra args. Implementations reuse existing subset_of / any_of on evaluated terms, so semantics match the infix operators (including numeric coercion and nodelist any-of behavior).

Usage: prefix calls in filters and projections (subsetof(@, [1,2,3])), method chains (@.anyof([1,2,3])), and top-level projections (anyof($.a, [4,5])). Tests cover filter, method, projection, and invalid arity paths.

Reviewed by Cursor Bugbot for commit c71785e. Bugbot is set up for automated code reviews on this repo. Configure here.

@TalBarYakar TalBarYakar self-assigned this Oct 13, 2026
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.26%. Comparing base (1821dd2) to head (c71785e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1672   +/-   ##
=======================================
  Coverage   88.25%   88.26%           
=======================================
  Files          17       17           
  Lines        6073     6076    +3     
=======================================
+ Hits         5360     5363    +3     
  Misses        713      713           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AvivDavid23
AvivDavid23 merged commit 9b50f0d into master Oct 13, 2026
62 checks passed
@AvivDavid23
AvivDavid23 deleted the tal.ba/bug/json_path_func branch October 13, 2026 08:00
TalBarYakar added a commit that referenced this pull request Oct 13, 2026
…1673)

* jsonpath fix for subsetof

* fix jsonpath for anyof and oneof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants