From 694939cee8588b0c8330bec73ffa36011a479f8f Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 2 Apr 2015 06:32:39 +0300 Subject: [PATCH] dbms: added test [#METR-15790]. --- .../00141_parse_timestamp_as_datetime.reference | 1 + .../0_stateless/00141_parse_timestamp_as_datetime.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.reference create mode 100644 dbms/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.sql diff --git a/dbms/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.reference b/dbms/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.reference new file mode 100644 index 00000000000..221114e65e3 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.reference @@ -0,0 +1 @@ +2009-02-01 1234567890 diff --git a/dbms/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.sql b/dbms/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.sql new file mode 100644 index 00000000000..2839dca31bc --- /dev/null +++ b/dbms/tests/queries/0_stateless/00141_parse_timestamp_as_datetime.sql @@ -0,0 +1,7 @@ +DROP TABLE IF EXISTS test.default; + +CREATE TABLE test.default (d Date DEFAULT toDate(t), t DateTime) ENGINE = MergeTree(d, t, 8192); +INSERT INTO test.default (t) VALUES ('1234567890'); +SELECT toStartOfMonth(d), toUInt32(t) FROM test.default; + +DROP TABLE test.default;