Skip to content

Commit

Permalink
Add tests for year month intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
caicancai authored and mihaibudiu committed Sep 15, 2024
1 parent 48f0424 commit 6593f26
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3332,7 +3332,14 @@ static void checkOverlaps(OverlapChecker c) {
+ " date '1969-04-29') day / 2) is not null",
true);
}
// TODO: Add tests for year month intervals (currently not supported)
f.checkScalar("(date '2023-12-01' - date '2022-12-01') year",
"+1", "INTERVAL YEAR NOT NULL");
f.checkScalar("(date '2022-12-01' - date '2023-12-01') year",
"-1", "INTERVAL YEAR NOT NULL");
f.checkScalar("(date '2023-12-01' - date '2023-01-01') month",
"+11", "INTERVAL MONTH NOT NULL");
f.checkScalar("(date '2023-01-01' - date '2023-12-01') month",
"-11", "INTERVAL MONTH NOT NULL");
}

@Test void testMultiplyOperator() {
Expand Down

0 comments on commit 6593f26

Please sign in to comment.