korlov42 commented on a change in pull request #9258:
URL: https://github.com/apache/ignite/pull/9258#discussion_r671124867
##########
File path:
modules/calcite/src/test/sql/function/timestamp/test_timestampadd.test
##########
@@ -0,0 +1,97 @@
+# name: test/sql/function/test/test_timestampadd.test
+# description: Just simple test to check support of timestampadd functions
+# group: [timestamp]
+
+
+query T
+SELECT TIMESTAMPADD(MICROSECOND, 10000, TIMESTAMP '2021-07-08 08:22:33.98');
+----
+2021-07-08 08:22:33.99
+
+query T
+SELECT TIMESTAMPADD(MICROSECOND, 10000, TIMESTAMP '2021-07-08 08:22:33.99');
+----
+2021-07-08 08:22:34.0
+
+query T
+SELECT TIMESTAMPADD(SECOND, 1, TIMESTAMP '2021-07-08 08:22:33');
+----
+2021-07-08 08:22:34.0
+
+query T
+SELECT TIMESTAMPADD(SECOND, 1, TIMESTAMP '2021-07-08 08:22:59');
+----
+2021-07-08 08:23:00.0
+
+query T
+SELECT TIMESTAMPADD(MINUTE, 1, TIMESTAMP '2021-07-08 08:22:33');
+----
+2021-07-08 08:23:33.0
+
+query T
+SELECT TIMESTAMPADD(MINUTE, 1, TIMESTAMP '2021-07-08 08:59:59');
+----
+2021-07-08 09:00:59.0
+
+
+query T
+SELECT TIMESTAMPADD(HOUR, 1, TIMESTAMP '2021-07-08 08:59:59');
+----
+2021-07-08 09:59:59.0
+
+query T
+SELECT TIMESTAMPADD(HOUR, 1, TIMESTAMP '2021-07-08 23:22:33');
+----
+2021-07-09 00:22:33.0
+
+query T
+SELECT TIMESTAMPADD(DAY, 1, TIMESTAMP '2021-07-08 08:22:33');
+----
+2021-07-09 08:22:33.0
+
+query T
+SELECT TIMESTAMPADD(DAY, 1, TIMESTAMP '2021-07-31 08:22:33');
+----
+2021-08-01 08:22:33.0
+
+query T
+SELECT TIMESTAMPADD(WEEK, 1, TIMESTAMP '2021-07-08 08:22:33');
+----
+2021-07-15 08:22:33.0
+
+query T
+SELECT TIMESTAMPADD(WEEK, 1, TIMESTAMP '2021-07-31 08:22:33');
+----
+2021-08-07 08:22:33.0
+
+query T
+SELECT TIMESTAMPADD(MONTH, 1, TIMESTAMP '2021-08-31 08:22:33');
+----
+2021-09-30 08:22:33.0
+
+#query T
+#SELECT TIMESTAMPADD(MONTH, 1, TIMESTAMP '2021-12-31 08:22:33');
+#----
+#2022-01-31 08:22:33.0
+
+query T
+SELECT TIMESTAMPADD(QUARTER, 1, TIMESTAMP '2021-08-31 08:22:33');
+----
+2021-11-30 08:22:33.0
+
+query T
+SELECT TIMESTAMPADD(QUARTER, 1, TIMESTAMP '2021-12-31 08:22:33');
+----
+2022-03-31 08:22:33.0
+
+query T
+SELECT TIMESTAMPADD(YEAR, 1, TIMESTAMP '2021-12-31 08:22:33');
+----
+2022-12-31 08:22:33.0
+
Review comment:
too many empty rows at the end
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]