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

Expression '(a > 5 and a < 15) or (a > 10 and a < 20)' should be simplified to 'SEARCH(a, Sarg[(5..20)])'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.33.0
    • None

    Description

      If there is only one range in search/sarg after simplification, the result of sarg collector is ignored (SargCollector#needToFix() method).

      Expression  (a > 5 and a < 15) or (a > 10 and a < 20) is simplified to OR(SEARCH(a, Sarg[(5..15)]), SEARCH(a, Sarg[(10..20)])) but expected SEARCH(a, Sarg[(5..20)]).

      If there are more the one intervals or if open interval exists, expressions simplified as expected.

       

      Attachments

        Activity

          People

            alex_pl Aleksey Plekhanov
            alex_pl Aleksey Plekhanov
            Votes:
            0 Vote for this issue
            Watchers:
            6 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 - 40m
                40m