asereda-gs commented on a change in pull request #1099: [CALCITE-2908]
Implement SQL LAST_DAY function
URL: https://github.com/apache/calcite/pull/1099#discussion_r264335872
##########
File path:
core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
##########
@@ -5577,6 +5577,46 @@ private void checkNullOperand(SqlTester tester, String
op) {
}
}
+ @Test public void testLastDayFunc() {
+ tester.setFor(SqlStdOperatorTable.LAST_DAY);
+ tester.checkScalar("last_day(DATE '2019-02-10')",
Review comment:
Can tests more edge cases like below (last day of the month, leap year etc.)
:
1. `DATE '2019-02-28'`
2. `DATE '2020-02-20'` / `DATE '2020-02-29'` (leap years: 2012 / 2020 /
2076).
2. `DATE '2019-12-31'`
3. `DATE '2019-01-01'`
4. `DATE '2019-06-30'`
4. `DATE '9999-12-31'`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services