From c7e690980f6165c303de91edc7a463c1497971b6 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Thu, 6 Oct 2016 10:29:52 -0400 Subject: [PATCH] update column names in tests --- src/pg/test/expected/18_outliers_test.out | 8 ++++---- src/pg/test/sql/18_outliers_test.sql | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/pg/test/expected/18_outliers_test.out b/src/pg/test/expected/18_outliers_test.out index 417933b..0798e0c 100644 --- a/src/pg/test/expected/18_outliers_test.out +++ b/src/pg/test/expected/18_outliers_test.out @@ -1,21 +1,21 @@ SET client_min_messages TO WARNING; \set ECHO none -outlier|rowid +is_outlier|rowid t|11 t|16 t|17 (3 rows) -outlier|rowid +is_outlier|rowid t|16 t|17 (2 rows) ERROR: Standard deviation of input data is zero -outlier|rowid +is_outlier|rowid t|8 t|11 t|16 (3 rows) -outlier|rowid +is_outlier|rowid t|8 t|9 t|11 diff --git a/src/pg/test/sql/18_outliers_test.sql b/src/pg/test/sql/18_outliers_test.sql index 3b56125..9a6b87d 100644 --- a/src/pg/test/sql/18_outliers_test.sql +++ b/src/pg/test/sql/18_outliers_test.sql @@ -24,7 +24,7 @@ WITH a AS ( ORDER BY ids) SELECT * FROM b -WHERE outlier IS TRUE; +WHERE is_outlier IS TRUE; -- With a threshold of 2.0 standard deviations, id 16 is the only outlier WITH a AS ( @@ -38,7 +38,7 @@ WITH a AS ( ORDER BY ids) SELECT * FROM b -WHERE outlier IS TRUE; +WHERE is_outlier IS TRUE; -- With a Stddev of zero, should throw back error -- With a threshold of 2.0 standard deviations, id 16 is the only outlier @@ -53,7 +53,7 @@ WITH a AS ( ORDER BY ids) SELECT * FROM b -WHERE outlier IS TRUE; +WHERE is_outlier IS TRUE; -- With a ratio threshold of 2.0 threshold (100% above or below the mean) -- which is greater than ~21, which are values @@ -68,7 +68,7 @@ WITH a AS ( ORDER BY ids) SELECT * FROM b - WHERE outlier IS TRUE; + WHERE is_outlier IS TRUE; -- With a static threshold of 11, what are the outliers WITH a AS ( @@ -79,8 +79,7 @@ WITH a AS ( SELECT unnest(vals) As v, unnest(ids) as i FROM a ) -SELECT cdb_crankshaft.CDB_StaticOutlier(v, 11.0) As outlier, i As rowid +SELECT cdb_crankshaft.CDB_StaticOutlier(v, 11.0) As is_outlier, i As rowid FROM b WHERE cdb_crankshaft.CDB_StaticOutlier(v, 11.0) is True ORDER BY i; -