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

OVERLAPS should swap operands if second is earlier than first

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.17.0
    • None

    Description

      If second date in interval is earlier than first OVERLAPS doesn't swap them.

      Example:

      select 1 from "TEST"."tdt" where (date '1999-12-01' , date '2001-12-31' ) overlaps ( date '2001-01-01' , date '2002-11-11' );
      
      +------------+
      |   EXPR$0   |
      +------------+
      | 1          |
      | 1          |
      | 1          |
      | 1          |
      +------------+
      
      select 1 from "TEST"."tdt" where ( date '2001-12-31', date '1999-12-01' ) overlaps ( date '2001-01-01' , date '2002-11-11' );
      +------------+
      |   EXPR$0   |
      +------------+
      

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              sharnyk Serhii Harnyk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: