From 059b0608b467b111d7a5b9b749f8e9c82faca255 Mon Sep 17 00:00:00 2001 From: Denis Zhuravlev Date: Wed, 14 Oct 2020 23:48:55 -0300 Subject: [PATCH] test for bug 5346 --- .../01517_select_final_distributed.reference | 6 ++++++ .../01517_select_final_distributed.sql | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/queries/0_stateless/01517_select_final_distributed.reference create mode 100644 tests/queries/0_stateless/01517_select_final_distributed.sql diff --git a/tests/queries/0_stateless/01517_select_final_distributed.reference b/tests/queries/0_stateless/01517_select_final_distributed.reference new file mode 100644 index 00000000000..83dad53404c --- /dev/null +++ b/tests/queries/0_stateless/01517_select_final_distributed.reference @@ -0,0 +1,6 @@ +1 2020-01-01 00:00:00 +1 2020-01-01 00:00:00 +1 2020-01-01 00:00:00 +1 2020-01-01 00:00:00 +1 2020-01-01 00:00:00 +1 2020-01-01 00:00:00 diff --git a/tests/queries/0_stateless/01517_select_final_distributed.sql b/tests/queries/0_stateless/01517_select_final_distributed.sql new file mode 100644 index 00000000000..1acc4590982 --- /dev/null +++ b/tests/queries/0_stateless/01517_select_final_distributed.sql @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS test5346; + +CREATE TABLE test5346 (`Id` String, `Timestamp` DateTime, `updated` DateTime) +ENGINE = ReplacingMergeTree(updated) PARTITION BY tuple() ORDER BY (Timestamp, Id); + +INSERT INTO test5346 VALUES('1',toDateTime('2020-01-01 00:00:00'),toDateTime('2020-01-01 00:00:00')); + +SELECT Id, Timestamp +FROM remote('localhost,127.0.0.1,127.0.0.2',currentDatabase(),'test5346') FINAL +ORDER BY Timestamp; + +SELECT Id, Timestamp +FROM remote('localhost,127.0.0.1,127.0.0.2',currentDatabase(),'test5346') FINAL +ORDER BY identity(Timestamp); + +DROP TABLE test5346;