From ce0f3da2b26cc41986a619b64b626d0037ed5b6f Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 15 Nov 2015 11:52:21 +0300 Subject: [PATCH] dbms: modified test [#METR-18778]. --- .../00275_quantiles_weighted.reference | 6 ++++++ .../0_stateless/00275_quantiles_weighted.sql | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/dbms/tests/queries/0_stateless/00275_quantiles_weighted.reference b/dbms/tests/queries/0_stateless/00275_quantiles_weighted.reference index 141a9861d05..313d3568b1d 100644 --- a/dbms/tests/queries/0_stateless/00275_quantiles_weighted.reference +++ b/dbms/tests/queries/0_stateless/00275_quantiles_weighted.reference @@ -4,3 +4,9 @@ 500 [0,1,10,50,100,200,300,400,500,600,700,800,900,950,990,999,1001] [0,33,101,225,317,448,549,634,708,776,838,896,950,976,996,1001,1001] +501 +[0,1,10,50,100,200,300,400,501,601,701,801,901,951,991,1000,1000] +[0,33,101,225,317,448,549,634,708,776,838,896,950,976,996,1000,1000] +501 +[0,1,10,50,100,200,300,400,501,601,701,801,901,951,991,1000,1001] +[0,33,101,225,317,448,549,634,708,776,838,896,950,976,996,1001,1001] diff --git a/dbms/tests/queries/0_stateless/00275_quantiles_weighted.sql b/dbms/tests/queries/0_stateless/00275_quantiles_weighted.sql index 57080fda08e..a927d971e57 100644 --- a/dbms/tests/queries/0_stateless/00275_quantiles_weighted.sql +++ b/dbms/tests/queries/0_stateless/00275_quantiles_weighted.sql @@ -5,3 +5,18 @@ SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6 SELECT quantileTimingWeighted(0.5)(number, 1) FROM (SELECT number FROM system.numbers LIMIT 1001); SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM (SELECT number FROM system.numbers LIMIT 1001); SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM (SELECT number FROM system.numbers LIMIT 1001); + +DROP TABLE IF EXISTS test.numbers_1001; +CREATE TABLE test.numbers_1001 (number UInt64) ENGINE = Memory; +SET max_block_size = 10; +INSERT INTO test.numbers_1001 SELECT number FROM system.numbers LIMIT 1001; + +SELECT quantileExactWeighted(0.5)(number, 1) FROM remote('127.0.0.{1,2}', test.numbers_1001); +SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM remote('127.0.0.{1,2}', test.numbers_1001); +SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM remote('127.0.0.{1,2}', test.numbers_1001); + +SELECT quantileTimingWeighted(0.5)(number, 1) FROM remote('127.0.0.{1,2}', test.numbers_1001); +SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM remote('127.0.0.{1,2}', test.numbers_1001); +SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM remote('127.0.0.{1,2}', test.numbers_1001); + +DROP TABLE test.numbers_1001;