Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIN filter expression returns "true" when element doesn't exist in the json #940

Open
wildMythicWest opened this issue Jun 28, 2023 · 0 comments

Comments

@wildMythicWest
Copy link

If we have some data
Map<String, Object> check = new HashMap<String, Object>(); check.put("item", 3); check.put("null_item", null);

and we use this filter
filter(where("not_existent_item").nin(3)).apply(createPredicateContext(check))
I expect to get false because no such element exists.
Instead the filter returns true.

If this is expected behavior, is it possible to add strict mode for filter expression matching so that if the element in the expression is not present the evaluator throws an exception?

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

No branches or pull requests

1 participant