-
Notifications
You must be signed in to change notification settings - Fork 35
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
Clarify FEEL null
handling in FilterExpression
#536
Comments
null
cohersion in FilterExpression
null
handling in FilterExpression
I brought this issue up in the DMN 1.5 RTF meeting today. We looked together into the specification and agreed that it's sufficiently specified. On page 109, one can read:
So for the third element, the evaluated filter is:
As As a follow-up, we should create a PR with a test case which ensures the behavior above between the implementations. |
Thanks for clarifying @barmac. I can see if I can add a TCK test case to cover two topics that you mention:
|
Before adding new tests please check if the existing ones do not cover your use case. |
Writing test cases for this you could argue that the spec is "underspecified", because each of the provided list member contexts have actual members with the given name. #540 attempts to create test cases for all cases covered by the spec ( At the same time #541 asserts the behavior of non-member context access. |
Describe the context
The DMN 1.4 specification gives users some pointers on how FEEL should handle invalid inputs and data formats (cf. additional context). From what it reads to me the way is
null
cohersion. Invalid (incompatible operations, access, or invocations) yieldnull
. That intention is not explicitly expressed though (you need to read between the lines, interpret what is actually specified.null
cohersion aroundFilterExpression
is not clearly specified and may lead to engines behaving slightly different:Expected Behavior
Alternative Interpretations
To be clear there exists a number of different possible interpretations:
strict
null
handling, blowing upstrict type format handling
Coherse to empty list as not all of the list members match
{ b }
.Additional Context
I'm aware of the following cases of
null
cohersion, explicitly defined by the spec:Access function with wrong arguments
Unboxing of single value lists
Related to #537
The text was updated successfully, but these errors were encountered: