From 710921dc46ecd73dbede09599f8d7d575dfe6569 Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Tue, 27 Apr 2021 02:12:15 +0300 Subject: [PATCH] fix tests --- src/AggregateFunctions/StatCommon.h | 5 +++++ .../01802_rank_corr_mann_whitney_over_window.reference | 10 ---------- .../01802_rank_corr_mann_whitney_over_window.sql | 4 ++-- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/AggregateFunctions/StatCommon.h b/src/AggregateFunctions/StatCommon.h index 0382a997562..dc94a6b6e77 100644 --- a/src/AggregateFunctions/StatCommon.h +++ b/src/AggregateFunctions/StatCommon.h @@ -11,6 +11,11 @@ namespace DB { +namespace ErrorCodes +{ + extern const int BAD_ARGUMENTS; +} + template static Float64 integrateSimpson(Float64 a, Float64 b, F && func) { diff --git a/tests/queries/0_stateless/01802_rank_corr_mann_whitney_over_window.reference b/tests/queries/0_stateless/01802_rank_corr_mann_whitney_over_window.reference index 42acbe4fbaf..e69de29bb2d 100644 --- a/tests/queries/0_stateless/01802_rank_corr_mann_whitney_over_window.reference +++ b/tests/queries/0_stateless/01802_rank_corr_mann_whitney_over_window.reference @@ -1,10 +0,0 @@ -0.5060606060606061 -0.5083333333333333 -0.5119047619047619 -0.5178571428571428 -0.5285714285714286 -0.525 -0.55 -0.625 -0.5 -nan diff --git a/tests/queries/0_stateless/01802_rank_corr_mann_whitney_over_window.sql b/tests/queries/0_stateless/01802_rank_corr_mann_whitney_over_window.sql index 3c1746a30f8..24ee9282ac0 100644 --- a/tests/queries/0_stateless/01802_rank_corr_mann_whitney_over_window.sql +++ b/tests/queries/0_stateless/01802_rank_corr_mann_whitney_over_window.sql @@ -13,10 +13,10 @@ ENGINE = MergeTree ORDER BY enroll_date SETTINGS index_granularity = 8192; -INSERT INTO 01802_empsalary VALUES ('sales', 1, 5000, '2006-10-01'), ('develop', 8, 6000, '2006-10-01'), ('personnel', 2, 3900, '2006-12-23'), ('develop', 10, 5200, '2007-08-01'), ('sales', 3, 4800, '2007-08-01'), ('sales', 4, 4800, '2007-08-08'), ('develop', 11, 5200, '2007-08-15'), ('personnel', 5, 3500, '2007-12-10'), ('develop', 7, 4200, '2008-01-01'), ('develop', 9, 4500, '2008-01-01'); +INSERT INTO 01802_empsalary VALUES ('sales', 1, 5000, '2006-10-01'), ('develop', 8, 6000, '2006-10-01'), ('personnel', 2, 3900, '2006-12-23'), ('develop', 10, 5200, '2007-08-01'), ('sales', 3, 4800, '2007-08-01'), ('sales', 4, 4801, '2007-08-08'), ('develop', 11, 5200, '2007-08-15'), ('personnel', 5, 3500, '2007-12-10'), ('develop', 7, 4200, '2008-01-01'), ('develop', 9, 4500, '2008-01-01'); SELECT mannWhitneyUTest(salary, salary) OVER (ORDER BY salary ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) AS func FROM 01802_empsalary; -- {serverError 36} -SELECT rankCorr(salary, 0.5) OVER (ORDER BY salary ASC ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) AS func FROM 01802_empsalary; +SELECT rankCorr(salary, 0.5) OVER (ORDER BY salary ASC ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) AS func FROM 01802_empsalary; -- {serverError 36} DROP TABLE IF EXISTS 01802_empsalary;