From f7f1c1b2678a9ab3bd7ce874e41536c996ef2844 Mon Sep 17 00:00:00 2001 From: Denis Zhuravlev Date: Mon, 19 Oct 2020 17:09:10 -0300 Subject: [PATCH] test for #8546 --- ...01519_topK_distributed_parametrized.reference | 6 ++++++ .../01519_topK_distributed_parametrized.sql | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/queries/0_stateless/01519_topK_distributed_parametrized.reference create mode 100644 tests/queries/0_stateless/01519_topK_distributed_parametrized.sql diff --git a/tests/queries/0_stateless/01519_topK_distributed_parametrized.reference b/tests/queries/0_stateless/01519_topK_distributed_parametrized.reference new file mode 100644 index 00000000000..9de83e04b5b --- /dev/null +++ b/tests/queries/0_stateless/01519_topK_distributed_parametrized.reference @@ -0,0 +1,6 @@ +30 +30 +10 +10 +3 +3 diff --git a/tests/queries/0_stateless/01519_topK_distributed_parametrized.sql b/tests/queries/0_stateless/01519_topK_distributed_parametrized.sql new file mode 100644 index 00000000000..9963823023d --- /dev/null +++ b/tests/queries/0_stateless/01519_topK_distributed_parametrized.sql @@ -0,0 +1,16 @@ +CREATE TABLE IF NOT EXISTS topXtest(A Int64) ENGINE = Memory; +INSERT INTO topXtest SELECT number FROM numbers(100); +INSERT INTO topXtest SELECT number FROM numbers(30); +INSERT INTO topXtest SELECT number FROM numbers(10); + +SELECT length(topK(30)(A)) FROM topXtest; +SELECT length(topK(30)(A)) FROM remote('localhost,127.0.0.1', currentDatabase(), topXtest); + +SELECT length(topK(A)) FROM topXtest; +SELECT length(topK(A)) FROM remote('localhost,127.0.0.1', currentDatabase(), topXtest); + +SELECT length(topK(3)(A)) FROM topXtest; +SELECT length(topK(3)(A)) FROM remote('localhost,127.0.0.1', currentDatabase(), topXtest); + +DROP TABLE topXtest; +