Bug 1263233 - Issues in guided dtable analysis - ConditionInspectors
Summary: Issues in guided dtable analysis - ConditionInspectors
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER5
: 6.2.0
Assignee: Toni Rikkola
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-15 11:54 UTC by Zuzana Krejčová
Modified: 2020-03-27 19:38 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:38:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1256348 0 low CLOSED Guided DT, Analysis: no report for empty rules/rows 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1256732 0 medium CLOSED Guided DT, Analysis: issues with 'is null' and 'is not null' operators not detected correctly 2021-02-22 00:41:40 UTC

Internal Links: 1256348 1256732

Description Zuzana Krejčová 2015-09-15 11:54:35 UTC
Description of problem:
For String conditions, the allowed operators are:
==, !=, >, >=, <, <=, in, not in, == null, != null, matches, soundslike (and no operator)
StringConditionInspector only works with operators ==, !=, in - when a String condition uses any other operator, issues are not detected correctly. This also affects the issue descriptions.
Furthermore, conditions like:
'name == "a"' and 'name in ("a")' 
'name != "a"' and 'name not in ("a")' 
should be considered redundant,
'name != "a"' and 'name in ("a", "b")'
should not conflict (in one row/rule)
'name != "b"' should subsume 'name == "a"' 
'name in ("b", "c")' should not subsume 'name != "a"'

For numeric conditions, the allowed operators also include: in, not in, == null, != null (and no operator) which are, again, not taken into account in ComparableConditionInspector. This again leads to incorrect detection of issues.
Also, there are issues when one condition has == or != operator and the other has <, >, <=, >=.
Furthermore, some edge cases are troublesome for <, >, <=, >=:
'age > 0' and 'age < 1' 
'age > 0' and 'age <= 0' 
should create a conflict within one row/rule
'age > -10' and 'age > 0'
should not create a conflict within one row/rule
'age == 0' should not subsume 'age != 1'

Temporal operators after, before and coincides are allowed for Date, but again ignored wrt analysis.

For integer conditions, the following case (and similar) should raise a redundancy warning:
'age > 0' and 'age >= 1'

For more detailed list of issue, please see tests in PR https://github.com/droolsjbpm/drools-wb/pull/64 and also note bug 1256732.


Note You need to log in before you can comment on or make changes to this bug.