Skip to content

[incubator-kie-issues#2021] DMN boxed filter behavior in relation to implicit conversions #6393

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

Merged
merged 12 commits into from
Jul 17, 2025

Conversation

ChinchuAjith
Copy link
Contributor

Fixes apache/incubator-kie-issues#2021

This PR corrects the behavior of the DMN boxed filter with respect to implicit conversions.

@yesamer yesamer requested review from gitgabrio, baldimir and yesamer July 7, 2025 15:21
@kie-ci3
Copy link

kie-ci3 commented Jul 8, 2025

PR job #3 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-drools -u #6393 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6393/3/display/redirect

Test results:

  • PASSED: 23656
  • FAILED: 1

Those are the test failures:

org.kie.dmn.validation.ValidatorTest.validateAllValidSharedModels
Expecting empty but was: [Message [id=0, level=WARNING, path=valid_models/DMNv1_6/BoxedExpressions.dmn, line=30, column=-1
text=DMN: Variable named 'boxedFilter' is missing its type reference on node 'boxedFilter' (DMN id: _F2C7743C-F89C-42D1-89DA-689DFF6E11DA, Type ref not defined) ],
Message [id=0, level=WARNING, path=valid_models/DMNv1_6/BoxedExpressions.dmn, line=36, column=-1
text=DMN: Variable named 'boxedIterator' is missing its type reference on node 'boxedIterator' (DMN id: _CABFAFAB-3829-46C9-9584-EF093B904CBA, Type ref not defined) ]]

@yesamer yesamer added the DMN label Jul 9, 2025
@ChinchuAjith ChinchuAjith marked this pull request as draft July 9, 2025 09:52
@ChinchuAjith ChinchuAjith marked this pull request as ready for review July 11, 2025 05:05
@yesamer yesamer requested a review from Copilot July 11, 2025 07:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the behavior of DMN boxed filter operations in relation to implicit conversions, addressing issue #2021. The primary changes include correcting list type handling in the type registry and adding comprehensive test coverage for boxed filter and iterator operations.

  • Fixes list type collection flag in DMN type registry from false to true
  • Adds new test models for boxed filter and iterator operations
  • Implements comprehensive test coverage including edge cases and error scenarios

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
BoxedIterator.dmn DMN test model for boxed iterator operations with single number input
BoxedFilter.dmn DMN test model for boxed filter operations with string comparison
DMNTypeRegistryAbstractTest.java Unit tests for type registry functionality and built-in type handling
DMNRuntimeTest.java Integration tests for boxed filter/iterator scenarios including error cases
DMNTypeRegistryAbstract.java Core fix for list type collection flag and refactored type management
Comments suppressed due to low confidence (2)

kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java:529

  • The test method name 'boxedFilterInvalidConditionWithInvalidInput' is misleading as it actually tests a boxed iterator, not a boxed filter. Consider renaming to 'boxedIteratorWithInvalidInput'.
    void boxedFilterInvalidConditionWithInvalidInput(boolean useExecModelCompiler) {

kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/DMNRuntimeTest.java:551

  • The test method name 'boxedFilterInvalidConditionWithNonNumeric' is misleading as it actually tests a boxed iterator, not a boxed filter. Consider renaming to 'boxedIteratorWithNonNumericInput'.
    void boxedFilterInvalidConditionWithNonNumeric(boolean useExecModelCompiler) {

@baldimir baldimir merged commit 84a0f9d into apache:main Jul 17, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decision Engine: Review the DMN boxed filter behavior in relation to implicit conversions
6 participants