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

Return a list of dates instead of a range #1743

Open
AthiraHari77 opened this issue Jan 9, 2025 · 3 comments
Open

Return a list of dates instead of a range #1743

AthiraHari77 opened this issue Jan 9, 2025 · 3 comments
Labels
area:dmn Related to DMN area:engine Related to the runtime engines type:bug Something is behaving unexpectedly

Comments

@AthiraHari77
Copy link

There is a DMN TCK failure, when running with Drools:

[ERROR] 0084-feel-for-loops-test-01.decision_024 – Time elapsed: 0.001 s <<< ERROR!
java.lang.RuntimeException: ERROR: FAILURE: 'decision_024' expected='[1980-01-01, 1980-01-02, 1980-01-03]' but found='[[ 1980-01-01 .. 1980-01-03 ]]'

The test is located here (1). Based on the error, it looks like that Drools is returning a range instead of a list in this test case.

Options how to debug:

Replicating the test case directly in Drools repository, so it gets a proper stack trace pointing to the code path being executed, to be able to see the code areas, which may need a fix. If the test case is mainly just a FEEL expression (FEEL is a language used to write expressions in DMN), the FEEL expression could be added to a test class, e.g. this one (2), so it can be run in isolation.

(1) https://github.com/dmn-tck/tck/tree/master/TestCases/compliance-level-3/0084-feel-for-loops

(2) https://github.com/apache/incubator-kie-drools/blob/053d70c8f9145706e771f90e8ce2dafa3899b59b/kie-dmn/kie-dmn-feel/src/test/java/org/kie/dmn/feel/runtime/FEELConditionsAndLoopsTest.java#L31

@yesamer yesamer added type:bug Something is behaving unexpectedly area:dmn Related to DMN area:engine Related to the runtime engines labels Jan 9, 2025
@yesamer yesamer assigned yesamer and unassigned yesamer Jan 9, 2025
@jomarko
Copy link

jomarko commented Jan 10, 2025

Thank you for reporting the issue. I am not expert in DMN arrays syntax. To me the current behavior makes a sense to some extent. However, if you say it is wrong, then probably more cases needs to be addressed. I mean decision_020_a for example:

for i in [@"1980-01-03T00:00:00"..@"1980-01-01T00:00:00"] return i

It currently also returns [[ 1980-01-03T00:00 .. 1980-01-01T00:00 ]]

@baldimir
Copy link

Hi @jomarko, the test mentioned in the description is just one picked for fixing. The actual fix may fix also other TCK failures, like the one you mentioned.

@yesamer
Copy link

yesamer commented Jan 10, 2025

Failures in 1156 Test suite could be related, it would be nice to double check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dmn Related to DMN area:engine Related to the runtime engines type:bug Something is behaving unexpectedly
Projects
None yet
Development

No branches or pull requests

4 participants