diff --git a/src/test/regress/bin/diff b/src/test/regress/bin/diff index a2b3e6f64..50c819450 100755 --- a/src/test/regress/bin/diff +++ b/src/test/regress/bin/diff @@ -40,7 +40,7 @@ then $DIFF $args $file1.modified $file2.modified exitcode=$? - rm -rf $file1.modified $file2.modified + rm -f $file1.modified $file2.modified else # if test is not in normalized_tests.lst, just diff without normalizing. $DIFF $args $file1 $file2 diff --git a/src/test/regress/bin/normalize.sed b/src/test/regress/bin/normalize.sed index 856c2146a..7b8c14bb5 100644 --- a/src/test/regress/bin/normalize.sed +++ b/src/test/regress/bin/normalize.sed @@ -24,6 +24,9 @@ s/savepoint ".*" does not exist/no such savepoint/g # shard table names for multi_subtransactions s/"t2_[0-9]+"/"t2_xxxxxxx"/g +# shard table names for custom_aggregate_support +s/ daily_uniques_[0-9]+ / daily_uniques_xxxxxxx /g + # In foreign_key_restriction_enforcement, normalize shard names s/"(on_update_fkey_table_|fkey_)[0-9]+"/"\1xxxxxxx"/g diff --git a/src/test/regress/bin/normalized_tests.lst b/src/test/regress/bin/normalized_tests.lst index db95eb6d1..b1408edb7 100644 --- a/src/test/regress/bin/normalized_tests.lst +++ b/src/test/regress/bin/normalized_tests.lst @@ -16,6 +16,7 @@ multi_partition_pruning multi_subtransactions multi_modifying_xacts multi_insert_select +sql_procedure # the following tests' output are # normalized for EXPLAIN outputs @@ -34,3 +35,4 @@ window_functions multi_having_pushdown multi_partitioning multi_mx_explain +custom_aggregate_support diff --git a/src/test/regress/expected/multi_insert_select.out b/src/test/regress/expected/multi_insert_select.out index a25403e60..454b6e67e 100644 --- a/src/test/regress/expected/multi_insert_select.out +++ b/src/test/regress/expected/multi_insert_select.out @@ -541,7 +541,7 @@ DEBUG: Plan is router executable -- than we expect from subquery result. -- see the following tests SET client_min_messages TO INFO; --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first TRUNCATE agg_events; -- add a row to first table to make table contents different INSERT INTO raw_events_second (user_id, time, value_1, value_2, value_3, value_4) VALUES @@ -604,7 +604,7 @@ ORDER BY 9 | 9 (9 rows) --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; TRUNCATE agg_events; SET client_min_messages TO DEBUG2; @@ -619,7 +619,7 @@ DEBUG: distributed statement: INSERT INTO public.agg_events_13300009 AS citus_t DEBUG: distributed statement: INSERT INTO public.agg_events_13300010 AS citus_table_alias (user_id, value_1_agg) SELECT DISTINCT user_id, value_1 FROM public.raw_events_first_13300002 raw_events_first WHERE ((worker_hash(user_id) OPERATOR(pg_catalog.>=) 0) AND (worker_hash(user_id) OPERATOR(pg_catalog.<=) 1073741823)) DEBUG: distributed statement: INSERT INTO public.agg_events_13300011 AS citus_table_alias (user_id, value_1_agg) SELECT DISTINCT user_id, value_1 FROM public.raw_events_first_13300003 raw_events_first WHERE ((worker_hash(user_id) OPERATOR(pg_catalog.>=) 1073741824) AND (worker_hash(user_id) OPERATOR(pg_catalog.<=) 2147483647)) DEBUG: Plan is router executable --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; truncate agg_events; SET client_min_messages TO DEBUG2; @@ -649,7 +649,7 @@ DEBUG: Router planner cannot handle multi-shard select queries 9 | 90 (9 rows) --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; truncate agg_events; SET client_min_messages TO DEBUG2; diff --git a/src/test/regress/expected/multi_insert_select_9.out b/src/test/regress/expected/multi_insert_select_9.out index 3013f46fc..7a5b82621 100644 --- a/src/test/regress/expected/multi_insert_select_9.out +++ b/src/test/regress/expected/multi_insert_select_9.out @@ -540,7 +540,7 @@ DEBUG: Plan is router executable -- than we expect from subquery result. -- see the following tests SET client_min_messages TO INFO; --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first TRUNCATE agg_events; -- add a row to first table to make table contents different INSERT INTO raw_events_second (user_id, time, value_1, value_2, value_3, value_4) VALUES @@ -603,7 +603,7 @@ ORDER BY 9 | 9 (9 rows) --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; TRUNCATE agg_events; SET client_min_messages TO DEBUG2; @@ -618,7 +618,7 @@ DEBUG: distributed statement: INSERT INTO public.agg_events_13300009 AS citus_t DEBUG: distributed statement: INSERT INTO public.agg_events_13300010 AS citus_table_alias (user_id, value_1_agg) SELECT DISTINCT user_id, value_1 FROM public.raw_events_first_13300002 raw_events_first WHERE ((worker_hash(user_id) OPERATOR(pg_catalog.>=) 0) AND (worker_hash(user_id) OPERATOR(pg_catalog.<=) 1073741823)) DEBUG: distributed statement: INSERT INTO public.agg_events_13300011 AS citus_table_alias (user_id, value_1_agg) SELECT DISTINCT user_id, value_1 FROM public.raw_events_first_13300003 raw_events_first WHERE ((worker_hash(user_id) OPERATOR(pg_catalog.>=) 1073741824) AND (worker_hash(user_id) OPERATOR(pg_catalog.<=) 2147483647)) DEBUG: Plan is router executable --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; truncate agg_events; SET client_min_messages TO DEBUG2; @@ -648,7 +648,7 @@ DEBUG: Router planner cannot handle multi-shard select queries 9 | 90 (9 rows) --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; truncate agg_events; SET client_min_messages TO DEBUG2; diff --git a/src/test/regress/sql/multi_insert_select.sql b/src/test/regress/sql/multi_insert_select.sql index ee028e2e1..f1ca2d956 100644 --- a/src/test/regress/sql/multi_insert_select.sql +++ b/src/test/regress/sql/multi_insert_select.sql @@ -435,7 +435,7 @@ GROUP BY SET client_min_messages TO INFO; --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first TRUNCATE agg_events; -- add a row to first table to make table contents different INSERT INTO raw_events_second (user_id, time, value_1, value_2, value_3, value_4) VALUES @@ -471,7 +471,7 @@ FROM ORDER BY user_id, value_1_agg; --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; TRUNCATE agg_events; SET client_min_messages TO DEBUG2; @@ -483,7 +483,7 @@ INSERT INTO agg_events (value_1_agg, user_id) FROM raw_events_first; --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; truncate agg_events; SET client_min_messages TO DEBUG2; @@ -499,7 +499,7 @@ INSERT INTO agg_events (value_1_agg, user_id) SELECT user_id, value_1_agg FROM agg_events ORDER BY 1,2; --- we don't want to see constraint vialotions, so truncate first +-- we don't want to see constraint violations, so truncate first SET client_min_messages TO INFO; truncate agg_events; SET client_min_messages TO DEBUG2;