Bug 1263233 - Issues in guided dtable analysis - ConditionInspectors
Issues in guided dtable analysis - ConditionInspectors
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ER5
: 6.2.0
Assigned To: Toni Rikkola
Lukáš Petrovický
Depends On:
  Show dependency treegraph
Reported: 2015-09-15 07:54 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zuzana Krejčová 2015-09-15 07:54:35 EDT
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.