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

RexSimplify should simplify more always true OR expressions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.26.0
    • 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

              Unassigned Unassigned
              swtalbot Steven Talbot
              Votes:
              0 Vote for this issue
              Watchers:
              5 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