Comparing different types should return null
Closed this issue · 0 comments
saig0 commented
Describe the bug
If I compare two values of a different type, the engine returns a failure. But it should be more friendly and return null
instead.
This applies to expressions with the following operators: =
, !=
, <
, >
, etc.
And, this applies to unary-test expressions if the input value has a different type as the other value.
To Reproduce
Steps to reproduce the behavior:
- Evaluate the following expression
"foo" = 100
- Verify that the engine returns a failure:
failed to evaluate expression '"foo" = 100': expected String but found 'ValNumber(100)'
Expected behavior
According to the DMN spec, the comparison of different types should return null
.
(DMN 1.5, chapter 10.3.2.2, page 105)
- Related TCK test case: 0068-feel-equality
Environment
- FEEL engine version:
1.16
- Affects:
- Camunda Automation Platform 7: [7.x]
- Zeebe broker: [0.x]