[ https://issues.apache.org/jira/browse/CALCITE-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-1167: --------------------------------- Description: If second date in interval is earlier than first OVERLAPS doesn't swap them. Example: {code:java} 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 | +------------+ {code} was: If second date in interval is earlier than first OVERLAPS doesnt 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 | +------------+ > OVERLAPS doesnt swap operands > ----------------------------- > > Key: CALCITE-1167 > URL: https://issues.apache.org/jira/browse/CALCITE-1167 > Project: Calcite > Issue Type: Bug > Reporter: Serhii Harnyk > Assignee: Julian Hyde > Priority: Minor > Labels: newbie > > If second date in interval is earlier than first OVERLAPS doesn't swap them. > Example: > {code:java} > 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 | > +------------+ > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)