Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4159

RexSimplify should simplify more always true OR expressions

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.26.0
    • Component/s: None

      Description

      The following filters for a number are always true

      x > 0 or x <= 0 or x is null
      x < 0 or x >= 0 or x is null
      x < 1 or x > 0 or x is null

      where the 1/0 can be replaced by any number where the first is greater than the second

       

      The following filter for a varchar is always true:

      x LIKE '%' OR x is null

      It would be nice if RexSimplify.simplifyOrTerms handled these cases.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                swtalbot Steven Talbot
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m