mirror of https://github.com/citusdata/citus.git
Merge pull request #2838 from citusdata/normalize_sql_procedure_and_custom_aggregate_support
Tests: normalize sql_procedure and custom_aggregate_supportpull/2840/head
commit
e3ab6388c1
|
@ -40,7 +40,7 @@ then
|
||||||
$DIFF $args $file1.modified $file2.modified
|
$DIFF $args $file1.modified $file2.modified
|
||||||
exitcode=$?
|
exitcode=$?
|
||||||
|
|
||||||
rm -rf $file1.modified $file2.modified
|
rm -f $file1.modified $file2.modified
|
||||||
else
|
else
|
||||||
# if test is not in normalized_tests.lst, just diff without normalizing.
|
# if test is not in normalized_tests.lst, just diff without normalizing.
|
||||||
$DIFF $args $file1 $file2
|
$DIFF $args $file1 $file2
|
||||||
|
|
|
@ -24,6 +24,9 @@ s/savepoint ".*" does not exist/no such savepoint/g
|
||||||
# shard table names for multi_subtransactions
|
# shard table names for multi_subtransactions
|
||||||
s/"t2_[0-9]+"/"t2_xxxxxxx"/g
|
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
|
# In foreign_key_restriction_enforcement, normalize shard names
|
||||||
s/"(on_update_fkey_table_|fkey_)[0-9]+"/"\1xxxxxxx"/g
|
s/"(on_update_fkey_table_|fkey_)[0-9]+"/"\1xxxxxxx"/g
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ multi_partition_pruning
|
||||||
multi_subtransactions
|
multi_subtransactions
|
||||||
multi_modifying_xacts
|
multi_modifying_xacts
|
||||||
multi_insert_select
|
multi_insert_select
|
||||||
|
sql_procedure
|
||||||
|
|
||||||
# the following tests' output are
|
# the following tests' output are
|
||||||
# normalized for EXPLAIN outputs
|
# normalized for EXPLAIN outputs
|
||||||
|
@ -34,3 +35,4 @@ window_functions
|
||||||
multi_having_pushdown
|
multi_having_pushdown
|
||||||
multi_partitioning
|
multi_partitioning
|
||||||
multi_mx_explain
|
multi_mx_explain
|
||||||
|
custom_aggregate_support
|
||||||
|
|
|
@ -541,7 +541,7 @@ DEBUG: Plan is router executable
|
||||||
-- than we expect from subquery result.
|
-- than we expect from subquery result.
|
||||||
-- see the following tests
|
-- see the following tests
|
||||||
SET client_min_messages TO INFO;
|
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;
|
TRUNCATE agg_events;
|
||||||
-- add a row to first table to make table contents different
|
-- 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
|
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 | 9
|
||||||
(9 rows)
|
(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;
|
SET client_min_messages TO INFO;
|
||||||
TRUNCATE agg_events;
|
TRUNCATE agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
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_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: 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
|
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;
|
SET client_min_messages TO INFO;
|
||||||
truncate agg_events;
|
truncate agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
|
@ -649,7 +649,7 @@ DEBUG: Router planner cannot handle multi-shard select queries
|
||||||
9 | 90
|
9 | 90
|
||||||
(9 rows)
|
(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;
|
SET client_min_messages TO INFO;
|
||||||
truncate agg_events;
|
truncate agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
|
|
|
@ -540,7 +540,7 @@ DEBUG: Plan is router executable
|
||||||
-- than we expect from subquery result.
|
-- than we expect from subquery result.
|
||||||
-- see the following tests
|
-- see the following tests
|
||||||
SET client_min_messages TO INFO;
|
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;
|
TRUNCATE agg_events;
|
||||||
-- add a row to first table to make table contents different
|
-- 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
|
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 | 9
|
||||||
(9 rows)
|
(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;
|
SET client_min_messages TO INFO;
|
||||||
TRUNCATE agg_events;
|
TRUNCATE agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
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_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: 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
|
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;
|
SET client_min_messages TO INFO;
|
||||||
truncate agg_events;
|
truncate agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
|
@ -648,7 +648,7 @@ DEBUG: Router planner cannot handle multi-shard select queries
|
||||||
9 | 90
|
9 | 90
|
||||||
(9 rows)
|
(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;
|
SET client_min_messages TO INFO;
|
||||||
truncate agg_events;
|
truncate agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
|
|
|
@ -435,7 +435,7 @@ GROUP BY
|
||||||
|
|
||||||
SET client_min_messages TO INFO;
|
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;
|
TRUNCATE agg_events;
|
||||||
-- add a row to first table to make table contents different
|
-- 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
|
INSERT INTO raw_events_second (user_id, time, value_1, value_2, value_3, value_4) VALUES
|
||||||
|
@ -471,7 +471,7 @@ FROM
|
||||||
ORDER BY
|
ORDER BY
|
||||||
user_id, value_1_agg;
|
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;
|
SET client_min_messages TO INFO;
|
||||||
TRUNCATE agg_events;
|
TRUNCATE agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
|
@ -483,7 +483,7 @@ INSERT INTO agg_events (value_1_agg, user_id)
|
||||||
FROM
|
FROM
|
||||||
raw_events_first;
|
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;
|
SET client_min_messages TO INFO;
|
||||||
truncate agg_events;
|
truncate agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
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;
|
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;
|
SET client_min_messages TO INFO;
|
||||||
truncate agg_events;
|
truncate agg_events;
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
|
|
Loading…
Reference in New Issue