From 0c063d29c0ea375222df3bc24e0f87f906b94d86 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 23 Jun 2020 00:54:02 +0300 Subject: [PATCH] Added a test --- .../01340_datetime64_fpe.reference | 22 ++++++ .../0_stateless/01340_datetime64_fpe.sql | 71 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 tests/queries/0_stateless/01340_datetime64_fpe.reference create mode 100644 tests/queries/0_stateless/01340_datetime64_fpe.sql diff --git a/tests/queries/0_stateless/01340_datetime64_fpe.reference b/tests/queries/0_stateless/01340_datetime64_fpe.reference new file mode 100644 index 00000000000..0a99fbafde4 --- /dev/null +++ b/tests/queries/0_stateless/01340_datetime64_fpe.reference @@ -0,0 +1,22 @@ +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 +2011-11-11 11:11:11 diff --git a/tests/queries/0_stateless/01340_datetime64_fpe.sql b/tests/queries/0_stateless/01340_datetime64_fpe.sql new file mode 100644 index 00000000000..7e7b68f7f01 --- /dev/null +++ b/tests/queries/0_stateless/01340_datetime64_fpe.sql @@ -0,0 +1,71 @@ +WITH toDateTime64('2019-09-16 19:20:12.3456789102019-09-16 19:20:12.345678910', 0) AS dt64 SELECT dt64; -- { serverError 6 } + +SELECT toDateTime64('2011-11-11 11:11:11.1234567890123456789', 0); +SELECT toDateTime64('2011-11-11 11:11:11.-12345678901234567890', 0); -- { serverError 6 } + + +SELECT toDateTime64('2011-11-11 11:11:11.1', 0); +SELECT toDateTime64('2011-11-11 11:11:11.11', 0); +SELECT toDateTime64('2011-11-11 11:11:11.111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.1111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.11111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.1111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.11111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.1111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.11111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.1111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.11111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.111111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.1111111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.11111111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.111111111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.1111111111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.11111111111111111111', 0); +SELECT toDateTime64('2011-11-11 11:11:11.111111111111111111111', 0); + +SELECT toDateTime64('2011-11-11 11:11:11.-1', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-11', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-1111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-11111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-1111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-11111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-1111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-11111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-1111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-11111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-111111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-1111111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-11111111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-111111111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-1111111111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-11111111111111111111', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.-111111111111111111111', 0); -- { serverError 6 } + +SELECT toDateTime64('2011-11-11 11:11:11.+1', 0); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.++11', 10); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.+111', 3); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.+++1111', 5); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.+11111', 7); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.+++++111111', 2); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.+1111111', 1); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.++++++11111111', 8); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.+111111111', 9); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.+++++++1111111111', 6); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.+11111111111', 4); -- { serverError 6 } +SELECT toDateTime64('2011-11-11 11:11:11.++++++++111111111111', 11); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.+1111111111111', 15); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.+++++++++11111111111111', 13); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.+111111111111111', 12); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.++++++++++1111111111111111', 16); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.+11111111111111111', 14); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.+++++++++++111111111111111111', 15); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.+1111111111111111111', 17); -- { serverError 407 } +SELECT toDateTime64('2011-11-11 11:11:11.++++++++++++11111111111111111111', 19); -- { serverError 69 } +SELECT toDateTime64('2011-11-11 11:11:11.+111111111111111111111', 18); -- { serverError 407 }