From 0217de37b9cfba7dbb81e63a402d41e4a8df67d6 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 15 Aug 2020 20:55:49 +0300 Subject: [PATCH] Fix topK test --- tests/queries/0_stateless/00981_topK_topKWeighted_long.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/queries/0_stateless/00981_topK_topKWeighted_long.sql b/tests/queries/0_stateless/00981_topK_topKWeighted_long.sql index c1f385fae80..5758f8ab8e5 100644 --- a/tests/queries/0_stateless/00981_topK_topKWeighted_long.sql +++ b/tests/queries/0_stateless/00981_topK_topKWeighted_long.sql @@ -2,8 +2,7 @@ DROP TABLE IF EXISTS topk; CREATE TABLE topk (val1 String, val2 UInt32) ENGINE = MergeTree ORDER BY val1; -INSERT INTO topk SELECT toString(number), number FROM numbers(3000000); -INSERT INTO topk SELECT toString(number % 10), 999999999 FROM numbers(1000000); +INSERT INTO topk WITH number % 7 = 0 AS frequent SELECT toString(frequent ? number % 10 : number), frequent ? 999999999 : number FROM numbers(4000000); SELECT arraySort(topK(10)(val1)) FROM topk; SELECT arraySort(topKWeighted(10)(val1, val2)) FROM topk;