2019-04-01 16:18:13 +00:00
|
|
|
USE test;
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS A;
|
|
|
|
|
2019-10-03 02:07:36 +00:00
|
|
|
SELECT CAST(1 as DateTime64('abc')); -- { serverError 43 } # Invalid scale parameter type
|
|
|
|
SELECT CAST(1 as DateTime64(100)); -- { serverError 69 } # too big scale
|
|
|
|
SELECT CAST(1 as DateTime64(-1)); -- { serverError 43 } # signed scale parameter type
|
|
|
|
SELECT CAST(1 as DateTime64(3, 'qqq')); -- { serverError 1000 } # invalid timezone
|
2019-12-18 16:10:26 +00:00
|
|
|
|
|
|
|
SELECT toDateTime64('2019-09-16 19:20:11.234', 'abc'); -- { serverError 43 } # invalid scale
|
|
|
|
SELECT toDateTime64('2019-09-16 19:20:11.234', 100); -- { serverError 69 } # too big scale
|
2019-10-21 11:46:38 +00:00
|
|
|
SELECT toDateTime64('2019-09-16 19:20:11.234', 3, 'qqq'); -- { serverError 1000 } # invalid timezone
|
2019-12-18 16:10:26 +00:00
|
|
|
|
|
|
|
SELECT ignore(now64(gccMurmurHash())); -- { serverError 43 } # Illegal argument type
|
|
|
|
SELECT ignore(now64('abcd')); -- { serverError 43 } # Illegal argument type
|
|
|
|
SELECT ignore(now64(number)) FROM system.numbers LIMIT 10; -- { serverError 43 } # Illegal argument type
|
|
|
|
|
2019-12-06 21:05:31 +00:00
|
|
|
SELECT toDateTime64('2019-09-16 19:20:11', 3, 'UTC'); -- this now works OK and produces timestamp with no subsecond part
|
2019-10-08 04:57:31 +00:00
|
|
|
|
2019-10-03 02:07:36 +00:00
|
|
|
CREATE TABLE A(t DateTime64(3, 'UTC')) ENGINE = MergeTree() ORDER BY t;
|
2019-11-05 13:40:23 +00:00
|
|
|
INSERT INTO A(t) VALUES ('2019-05-03 11:25:25.123456789');
|
2019-04-01 16:18:13 +00:00
|
|
|
|
2019-05-04 15:33:17 +00:00
|
|
|
SELECT toString(t, 'UTC'), toDate(t), toStartOfDay(t), toStartOfQuarter(t), toTime(t), toStartOfMinute(t) FROM A ORDER BY t;
|
2019-04-01 16:18:13 +00:00
|
|
|
|
2019-11-05 13:40:23 +00:00
|
|
|
SELECT toDateTime64('2019-09-16 19:20:11.234', 3, 'Europe/Minsk');
|
2019-10-21 11:46:38 +00:00
|
|
|
|
2019-11-10 13:23:02 +00:00
|
|
|
DROP TABLE A;
|