Skip to content

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

Open
@wildMythicWest

Description

@wildMythicWest

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions