mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
update tests for DayNum type
This commit is contained in:
parent
513b76ebf7
commit
1d5303c142
@ -1,4 +1,12 @@
|
|||||||
--TUMBLE--
|
--TUMBLE--
|
||||||
|
('2020-01-09 12:00:01','2020-01-09 12:00:02')
|
||||||
|
('2020-01-09 12:00:00','2020-01-09 12:01:00')
|
||||||
|
('2020-01-09 12:00:00','2020-01-09 13:00:00')
|
||||||
|
('2020-01-09 00:00:00','2020-01-10 00:00:00')
|
||||||
|
('2020-01-06','2020-01-13')
|
||||||
|
('2020-01-01','2020-02-01')
|
||||||
|
('2020-01-01','2020-04-01')
|
||||||
|
('2020-01-01','2021-01-01')
|
||||||
('2020-01-09 00:00:00','2020-01-10 00:00:00')
|
('2020-01-09 00:00:00','2020-01-10 00:00:00')
|
||||||
2020-01-09 00:00:00
|
2020-01-09 00:00:00
|
||||||
2020-01-08 00:00:00
|
2020-01-08 00:00:00
|
||||||
@ -9,6 +17,14 @@
|
|||||||
2020-01-10 00:00:00
|
2020-01-10 00:00:00
|
||||||
2020-01-10 00:00:00
|
2020-01-10 00:00:00
|
||||||
--HOP--
|
--HOP--
|
||||||
|
('2020-01-09 11:59:59','2020-01-09 12:00:02')
|
||||||
|
('2020-01-09 11:58:00','2020-01-09 12:01:00')
|
||||||
|
('2020-01-09 10:00:00','2020-01-09 13:00:00')
|
||||||
|
('2020-01-07 00:00:00','2020-01-10 00:00:00')
|
||||||
|
('2019-12-23','2020-01-13')
|
||||||
|
('2019-11-01','2020-02-01')
|
||||||
|
('2019-07-01','2020-04-01')
|
||||||
|
('2018-01-01','2021-01-01')
|
||||||
('2020-01-07 00:00:00','2020-01-10 00:00:00')
|
('2020-01-07 00:00:00','2020-01-10 00:00:00')
|
||||||
2020-01-07 00:00:00
|
2020-01-07 00:00:00
|
||||||
2020-01-06 00:00:00
|
2020-01-06 00:00:00
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
SELECT '--TUMBLE--';
|
SELECT '--TUMBLE--';
|
||||||
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 SECOND);
|
||||||
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 MINUTE);
|
||||||
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' HOUR);
|
||||||
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY);
|
||||||
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 WEEK);
|
||||||
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' MONTH);
|
||||||
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' QUARTER);
|
||||||
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' YEAR);
|
||||||
|
|
||||||
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY);
|
SELECT TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY);
|
||||||
SELECT TUMBLE_START(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY);
|
SELECT TUMBLE_START(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY);
|
||||||
SELECT toDateTime(TUMBLE_START(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY, 'US/Samoa'), 'US/Samoa');
|
SELECT toDateTime(TUMBLE_START(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY, 'US/Samoa'), 'US/Samoa');
|
||||||
@ -10,6 +19,15 @@ SELECT toDateTime(TUMBLE_END(toDateTime('2020-01-09 12:00:01', 'US/Samoa'), INTE
|
|||||||
SELECT TUMBLE_END(TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY));
|
SELECT TUMBLE_END(TUMBLE(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY));
|
||||||
|
|
||||||
SELECT '--HOP--';
|
SELECT '--HOP--';
|
||||||
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 SECOND, INTERVAL 3 SECOND);
|
||||||
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 MINUTE, INTERVAL 3 MINUTE);
|
||||||
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 HOUR, INTERVAL 3 HOUR);
|
||||||
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 DAY, INTERVAL 3 DAY);
|
||||||
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 WEEK, INTERVAL 3 WEEK);
|
||||||
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 MONTH, INTERVAL 3 MONTH);
|
||||||
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 QUARTER, INTERVAL 3 QUARTER);
|
||||||
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL 1 YEAR, INTERVAL 3 YEAR);
|
||||||
|
|
||||||
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY, INTERVAL '3' DAY);
|
SELECT HOP(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY, INTERVAL '3' DAY);
|
||||||
SELECT HOP_START(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY, INTERVAL '3' DAY);
|
SELECT HOP_START(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY, INTERVAL '3' DAY);
|
||||||
SELECT toDateTime(HOP_START(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa'), 'US/Samoa');
|
SELECT toDateTime(HOP_START(toDateTime('2020-01-09 12:00:01'), INTERVAL '1' DAY, INTERVAL '3' DAY, 'US/Samoa'), 'US/Samoa');
|
||||||
|
Loading…
Reference in New Issue
Block a user