Fix table name collision in tests in 0452b461bc
This commit is contained in:
parent
0452b461bc
commit
c03d91d9be
@ -2876,26 +2876,26 @@ RESET enable_incremental_sort;
|
|||||||
DROP TABLE btg;
|
DROP TABLE btg;
|
||||||
-- The case, when scanning sort order correspond to aggregate sort order but
|
-- The case, when scanning sort order correspond to aggregate sort order but
|
||||||
-- can not be found in the group-by list
|
-- can not be found in the group-by list
|
||||||
CREATE TABLE t1 (c1 int PRIMARY KEY, c2 int);
|
CREATE TABLE agg_sort_order (c1 int PRIMARY KEY, c2 int);
|
||||||
CREATE UNIQUE INDEX ON t1(c2);
|
CREATE UNIQUE INDEX ON agg_sort_order(c2);
|
||||||
explain (costs off)
|
explain (costs off)
|
||||||
SELECT array_agg(c1 ORDER BY c2),c2
|
SELECT array_agg(c1 ORDER BY c2),c2
|
||||||
FROM t1 WHERE c2 < 100 GROUP BY c1 ORDER BY 2;
|
FROM agg_sort_order WHERE c2 < 100 GROUP BY c1 ORDER BY 2;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
--------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
Sort
|
Sort
|
||||||
Sort Key: c2
|
Sort Key: c2
|
||||||
-> GroupAggregate
|
-> GroupAggregate
|
||||||
Group Key: c1
|
Group Key: c1
|
||||||
-> Sort
|
-> Sort
|
||||||
Sort Key: c1, c2
|
Sort Key: c1, c2
|
||||||
-> Bitmap Heap Scan on t1
|
-> Bitmap Heap Scan on agg_sort_order
|
||||||
Recheck Cond: (c2 < 100)
|
Recheck Cond: (c2 < 100)
|
||||||
-> Bitmap Index Scan on t1_c2_idx
|
-> Bitmap Index Scan on agg_sort_order_c2_idx
|
||||||
Index Cond: (c2 < 100)
|
Index Cond: (c2 < 100)
|
||||||
(10 rows)
|
(10 rows)
|
||||||
|
|
||||||
DROP TABLE t1 CASCADE;
|
DROP TABLE agg_sort_order CASCADE;
|
||||||
-- Check, that GROUP-BY reordering optimization can operate with pathkeys, built
|
-- Check, that GROUP-BY reordering optimization can operate with pathkeys, built
|
||||||
-- by planner itself. For example, by MergeJoin.
|
-- by planner itself. For example, by MergeJoin.
|
||||||
SET enable_hashjoin = off;
|
SET enable_hashjoin = off;
|
||||||
|
@ -1233,12 +1233,12 @@ DROP TABLE btg;
|
|||||||
|
|
||||||
-- The case, when scanning sort order correspond to aggregate sort order but
|
-- The case, when scanning sort order correspond to aggregate sort order but
|
||||||
-- can not be found in the group-by list
|
-- can not be found in the group-by list
|
||||||
CREATE TABLE t1 (c1 int PRIMARY KEY, c2 int);
|
CREATE TABLE agg_sort_order (c1 int PRIMARY KEY, c2 int);
|
||||||
CREATE UNIQUE INDEX ON t1(c2);
|
CREATE UNIQUE INDEX ON agg_sort_order(c2);
|
||||||
explain (costs off)
|
explain (costs off)
|
||||||
SELECT array_agg(c1 ORDER BY c2),c2
|
SELECT array_agg(c1 ORDER BY c2),c2
|
||||||
FROM t1 WHERE c2 < 100 GROUP BY c1 ORDER BY 2;
|
FROM agg_sort_order WHERE c2 < 100 GROUP BY c1 ORDER BY 2;
|
||||||
DROP TABLE t1 CASCADE;
|
DROP TABLE agg_sort_order CASCADE;
|
||||||
|
|
||||||
-- Check, that GROUP-BY reordering optimization can operate with pathkeys, built
|
-- Check, that GROUP-BY reordering optimization can operate with pathkeys, built
|
||||||
-- by planner itself. For example, by MergeJoin.
|
-- by planner itself. For example, by MergeJoin.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user