From d352e1c46390cd105a25c5ebd53d9225f4f148b6 Mon Sep 17 00:00:00 2001 From: Javier Goizueta Date: Tue, 12 Jan 2016 15:36:07 +0100 Subject: [PATCH] Update Overviews tests --- test/CDB_OverviewsTest.sql | 8 ++++++++ test/CDB_OverviewsTest_expect | 15 +++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/test/CDB_OverviewsTest.sql b/test/CDB_OverviewsTest.sql index 49aadae..2ef99ae 100644 --- a/test/CDB_OverviewsTest.sql +++ b/test/CDB_OverviewsTest.sql @@ -8,12 +8,20 @@ SELECT _CDB_Aggregated_Attributes_Expression('base_bare_t'::regclass); SELECT _CDB_Aggregated_Attributes_Expression('base_bare_t'::regclass, 'tab'); SELECT CDB_CreateOverviews('base_bare_t'::regclass); +SELECT count(*) FROM base_bare_t_ov5; + SELECT _CDB_Aggregable_Attributes_Expression('base_t'::regclass); SELECT _CDB_Aggregated_Attributes_Expression('base_t'::regclass); SELECT _CDB_Aggregated_Attributes_Expression('base_t'::regclass, 'tab'); SELECT CDB_CreateOverviews('base_t'::regclass); +SELECT count(*) FROM base_t_ov5; + + +SELECT CDB_DropOverviews('base_bare_t'::regclass); +SELECT CDB_DropOverviews('base_t'::regclass); +SELECT count(*) FROM base_t_ov5; DROP TABLE base_bare_t; DROP TABLE base_t; diff --git a/test/CDB_OverviewsTest_expect b/test/CDB_OverviewsTest_expect index d18d82d..29d79a7 100644 --- a/test/CDB_OverviewsTest_expect +++ b/test/CDB_OverviewsTest_expect @@ -6,10 +6,17 @@ INSERT 0 1114 -{base_bare_t_ov5,base_bare_t_ov3,base_bare_t_ov1} +{base_bare_t_ov5,base_bare_t_ov4,base_bare_t_ov3,base_bare_t_ov2,base_bare_t_ov1,base_bare_t_ov0} +125 number,int_number,name,start -AVG(number)::double precision AS number,AVG(int_number)::integer AS int_number,''::text AS name,NULL::date AS start -AVG(tab.number)::double precision AS number,AVG(tab.int_number)::integer AS int_number,''::text AS name,NULL::date AS start -{base_t_ov5,base_t_ov3,base_t_ov1} +AVG(number)::double precision AS number,AVG(int_number)::integer AS int_number,CASE count(*) WHEN 1 THEN string_agg(name,'/') ELSE '*' END::text AS name,CASE count(*) WHEN 1 THEN MIN(start) ELSE NULL END::date AS start +AVG(tab.number)::double precision AS number,AVG(tab.int_number)::integer AS int_number,CASE count(*) WHEN 1 THEN string_agg(tab.name,'/') ELSE '*' END::text AS name,CASE count(*) WHEN 1 THEN MIN(tab.start) ELSE NULL END::date AS start +{base_t_ov5,base_t_ov4,base_t_ov3,base_t_ov2,base_t_ov1,base_t_ov0} +125 + + +ERROR: relation "base_t_ov5" does not exist +LINE 1: SELECT count(*) FROM base_t_ov5; + ^ DROP TABLE DROP TABLE