camunda / feel-scala

FEEL parser and interpreter written in Scala
https://camunda.github.io/feel-scala/
Apache License 2.0
123 stars 50 forks source link

feat: Improve null handling in filter expressions #685

Closed korthout closed 1 year ago

korthout commented 1 year ago

Description

This changes the behavior of filter expressions to be more lenient.

Filter expressions now filter the list even when the filter expression is not evaluating to a boolean (for item comparison) or a number (for direct access).

When the filter expression would previously cause an error, the error is now suppressed and a list with only those values that match the filter expression is returned.

Please note that this pull request does not fully resolve issue #582. It does not yet deal with lists of contexts where the filter expression refers to missing properties of those contexts. This should be resolved in another pull request.

Related issues

partially deals with #582 (filters over context lists are not yet covered)

korthout commented 1 year ago

@saig0 I've tried to describe what we did. Please have a look 🙇

korthout commented 1 year ago

@saig0 Please have another look. I had to resolve a conflict in 04c123a.

saig0 commented 1 year ago

@korthout super. Thank you. :rocket: