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

OVERLAPS should swap operands if second is earlier than first

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.17.0
    • Component/s: None
    • Labels:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: