mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Merge pull request #54195 from ClickHouse/fix-flaky-test-01099
Fix flaky test `01099_operators_date_and_timestamp`
This commit is contained in:
commit
12d2dddb47
@ -16,3 +16,6 @@
|
||||
2001-09-29 03:25:45.000 DateTime64(3)
|
||||
2001-09-28 20:34:15.000 DateTime64(3)
|
||||
140400 Int32
|
||||
-23
|
||||
(1,1)
|
||||
(1,-1)
|
||||
|
@ -13,6 +13,8 @@ select (date '2001-10-01' - date '2001-09-28') x, toTypeName(x);
|
||||
select timestamp '2001-09-28 01:00:00' + interval 23 hour;
|
||||
select timestamp '2001-09-28 23:00:00' - interval 23 hour;
|
||||
|
||||
SET session_timezone = 'Europe/Amsterdam';
|
||||
|
||||
select (date '2001-09-29' + interval 12345 second) x, toTypeName(x);
|
||||
select (date '2001-09-29' + interval 12345 millisecond) x, toTypeName(x); -- { serverError 43 }
|
||||
select (date '2001-09-29' + interval 12345 microsecond) x, toTypeName(x); -- { serverError 43 }
|
||||
@ -30,17 +32,16 @@ select (toDate32('2001-09-29') - interval 12345 millisecond) x, toTypeName(x); -
|
||||
select (toDate32('2001-09-29') - interval 12345 microsecond) x, toTypeName(x); -- { serverError 43 }
|
||||
select (toDate32('2001-09-29') - interval 12345 nanosecond) x, toTypeName(x); -- { serverError 43 }
|
||||
|
||||
-- TODO: return interval
|
||||
select (timestamp '2001-12-29 03:00:00' - timestamp '2001-12-27 12:00:00') x, toTypeName(x); -- interval '1 day 15:00:00'
|
||||
select (timestamp '2001-12-29 03:00:00' - timestamp '2001-12-27 12:00:00') x, toTypeName(x);
|
||||
|
||||
-- select -interval 23 hour; -- interval '-23:00:00'
|
||||
-- select interval 1 day + interval 1 hour; -- interval '1 day 01:00:00'
|
||||
-- select interval '1 day' - interval '1 hour'; -- interval '1 day -01:00:00'
|
||||
select -interval 23 hour;
|
||||
select interval 1 day + interval 1 hour;
|
||||
select interval '1 day' - interval '1 hour';
|
||||
|
||||
-- select date '2001-09-28' + time '03:00'; -- timestamp '2001-09-28 03:00:00'
|
||||
-- select time '01:00' + interval '3 hours'; -- time '04:00:00'
|
||||
-- select time '05:00' - time '03:00'; -- interval '02:00:00'
|
||||
-- select time '05:00' - interval '2 hours'; -- time '03:00:00'
|
||||
-- select date '2001-09-28' + time '03:00';
|
||||
-- select time '01:00' + interval '3 hours';
|
||||
-- select time '05:00' - time '03:00';
|
||||
-- select time '05:00' - interval '2 hours';
|
||||
|
||||
-- select 900 * interval '1 second'; -- interval '00:15:00'
|
||||
-- select (21 * interval '1 day') x, toTypeName(x); -- interval '21 days'
|
||||
|
Loading…
Reference in New Issue
Block a user