Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-1489

Issues in guided dtable analysis - ConditionInspectors

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.2.0
    • 6.2.0
    • Business Central
    • None

      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.

              trikkola Toni Rikkola
              zkrejcov Zuzka Krejčová (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson
              Zuzka Krejčová Zuzka Krejčová (Inactive)
              Zuzka Krejčová Zuzka Krejčová (Inactive)
              Kris Verlaenen

                Created:
                Updated:
                Resolved:
                Archived: