From 3f5c178c93b9233a8042d8324517b668715f92d8 Mon Sep 17 00:00:00 2001 From: Sait Talha Nisanci Date: Thu, 19 Aug 2021 10:50:24 +0300 Subject: [PATCH] Remove VERBOSE output to make pg14 and pg13 output the same --- .../multi_subquery_window_functions.out | 37 ++++--------------- .../sql/multi_subquery_window_functions.sql | 2 +- 2 files changed, 8 insertions(+), 31 deletions(-) diff --git a/src/test/regress/expected/multi_subquery_window_functions.out b/src/test/regress/expected/multi_subquery_window_functions.out index 97a481df0..aa4249efc 100644 --- a/src/test/regress/expected/multi_subquery_window_functions.out +++ b/src/test/regress/expected/multi_subquery_window_functions.out @@ -675,7 +675,7 @@ LIMIT 2 | 1 (5 rows) -EXPLAIN (COSTS FALSE, VERBOSE TRUE) +EXPLAIN (COSTS FALSE) SELECT * FROM ( ( SELECT user_id, @@ -709,72 +709,49 @@ EXPLAIN (COSTS FALSE, VERBOSE TRUE) user_id)) AS ftop ORDER BY 2 DESC, 1 DESC LIMIT 5; - QUERY PLAN + QUERY PLAN --------------------------------------------------------------------- Limit - Output: remote_scan.user_id, remote_scan.sum -> Sort - Output: remote_scan.user_id, remote_scan.sum Sort Key: remote_scan.sum DESC, remote_scan.user_id DESC -> Custom Scan (Citus Adaptive) - Output: remote_scan.user_id, remote_scan.sum Task Count: 4 Tasks Shown: One of 4 -> Task - Query: SELECT worker_column_1 AS user_id, worker_column_2 AS sum FROM (SELECT ftop.user_id AS worker_column_1, ftop.sum AS worker_column_2 FROM (SELECT user_id_1.user_id, sum(user_id_1.counter) AS sum FROM (SELECT users_table.user_id, sum(users_table.value_2) OVER (PARTITION BY users_table.user_id) AS counter FROM public.users_table_1400256 users_table UNION SELECT events_table.user_id, sum(events_table.value_2) OVER (PARTITION BY events_table.user_id) AS counter FROM public.events_table_1400260 events_table) user_id_1 GROUP BY user_id_1.user_id UNION SELECT user_id_2.user_id, sum(user_id_2.counter) AS sum FROM (SELECT users_table.user_id, sum(users_table.value_2) OVER (PARTITION BY users_table.user_id) AS counter FROM public.users_table_1400256 users_table UNION SELECT events_table.user_id, sum(events_table.value_2) OVER (PARTITION BY events_table.user_id) AS counter FROM public.events_table_1400260 events_table) user_id_2 GROUP BY user_id_2.user_id) ftop) worker_subquery ORDER BY worker_column_2 DESC, worker_column_1 DESC LIMIT '5'::bigint Node: host=localhost port=xxxxx dbname=regression -> Limit - Output: users_table.user_id, (sum((sum(users_table.value_2) OVER (?)))) -> Sort - Output: users_table.user_id, (sum((sum(users_table.value_2) OVER (?)))) Sort Key: (sum((sum(users_table.value_2) OVER (?)))) DESC, users_table.user_id DESC -> HashAggregate - Output: users_table.user_id, (sum((sum(users_table.value_2) OVER (?)))) Group Key: users_table.user_id, (sum((sum(users_table.value_2) OVER (?)))) -> Append -> HashAggregate - Output: users_table.user_id, sum((sum(users_table.value_2) OVER (?))) Group Key: users_table.user_id -> HashAggregate - Output: users_table.user_id, (sum(users_table.value_2) OVER (?)) Group Key: users_table.user_id, (sum(users_table.value_2) OVER (?)) -> Append -> WindowAgg - Output: users_table.user_id, sum(users_table.value_2) OVER (?) -> Sort - Output: users_table.user_id, users_table.value_2 Sort Key: users_table.user_id - -> Seq Scan on public.users_table_1400256 users_table - Output: users_table.user_id, users_table.value_2 + -> Seq Scan on users_table_1400256 users_table -> WindowAgg - Output: events_table.user_id, sum(events_table.value_2) OVER (?) -> Sort - Output: events_table.user_id, events_table.value_2 Sort Key: events_table.user_id - -> Seq Scan on public.events_table_1400260 events_table - Output: events_table.user_id, events_table.value_2 + -> Seq Scan on events_table_1400260 events_table -> HashAggregate - Output: users_table_1.user_id, sum((sum(users_table_1.value_2) OVER (?))) Group Key: users_table_1.user_id -> HashAggregate - Output: users_table_1.user_id, (sum(users_table_1.value_2) OVER (?)) Group Key: users_table_1.user_id, (sum(users_table_1.value_2) OVER (?)) -> Append -> WindowAgg - Output: users_table_1.user_id, sum(users_table_1.value_2) OVER (?) -> Sort - Output: users_table_1.user_id, users_table_1.value_2 Sort Key: users_table_1.user_id - -> Seq Scan on public.users_table_1400256 users_table_1 - Output: users_table_1.user_id, users_table_1.value_2 + -> Seq Scan on users_table_1400256 users_table_1 -> WindowAgg - Output: events_table_1.user_id, sum(events_table_1.value_2) OVER (?) -> Sort - Output: events_table_1.user_id, events_table_1.value_2 Sort Key: events_table_1.user_id - -> Seq Scan on public.events_table_1400260 events_table_1 - Output: events_table_1.user_id, events_table_1.value_2 -(63 rows) + -> Seq Scan on events_table_1400260 events_table_1 +(40 rows) -- test with window functions which aren't pushed down SELECT diff --git a/src/test/regress/sql/multi_subquery_window_functions.sql b/src/test/regress/sql/multi_subquery_window_functions.sql index b5c0332d7..706aa64fa 100644 --- a/src/test/regress/sql/multi_subquery_window_functions.sql +++ b/src/test/regress/sql/multi_subquery_window_functions.sql @@ -441,7 +441,7 @@ ORDER BY LIMIT 5; -EXPLAIN (COSTS FALSE, VERBOSE TRUE) +EXPLAIN (COSTS FALSE) SELECT * FROM ( ( SELECT user_id,