Skip to content

Commit 956ef58

Browse files
author
Etsuro Fujita
committed
Clean up some misplaced comments in partition_join.sql regression test.
Also, add a comment explaining a test case. Back-patch to 11 where the regression test was added. Discussion: https://postgr.es/m/CAPmGK15adZPh2B%2BmGUjSOMH%2BH39ogDRWfCfm4G6jncZCAs9V_Q%40mail.gmail.com
1 parent e5a02e0 commit 956ef58

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/test/regress/expected/partition_join.out

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,8 +1996,8 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_m t1 LEFT JOIN prt2_m t2 ON t1.c = t2.c;
19961996
-> Seq Scan on prt2_m_p3 t2_3
19971997
(11 rows)
19981998

1999-
-- partitionwise join can not be applied between tables with different
2000-
-- partition lists
1999+
-- partitionwise join can not be applied for a join between list and range
2000+
-- partitioned tables
20012001
EXPLAIN (COSTS OFF)
20022002
SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 LEFT JOIN prt2_n t2 ON (t1.c = t2.c);
20032003
QUERY PLAN
@@ -2013,6 +2013,8 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 LEFT JOIN prt2_n t2 ON (t1.c = t2.c
20132013
-> Seq Scan on prt1_n_p2 t1_2
20142014
(9 rows)
20152015

2016+
-- partitionwise join can not be applied between tables with different
2017+
-- partition lists
20162018
EXPLAIN (COSTS OFF)
20172019
SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 JOIN prt2_n t2 ON (t1.c = t2.c) JOIN plt1 t3 ON (t1.c = t3.c);
20182020
QUERY PLAN
@@ -2035,8 +2037,8 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 JOIN prt2_n t2 ON (t1.c = t2.c) JOI
20352037
-> Seq Scan on prt1_n_p2 t1_2
20362038
(16 rows)
20372039

2038-
-- partitionwise join can not be applied for a join between list and range
2039-
-- partitioned tables
2040+
-- partitionwise join can not be applied for a join between key column and
2041+
-- non-key column
20402042
EXPLAIN (COSTS OFF)
20412043
SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 FULL JOIN prt1 t2 ON (t1.c = t2.c);
20422044
QUERY PLAN

src/test/regress/sql/partition_join.sql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,15 +430,18 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_m t1 LEFT JOIN prt2_m t2 ON t1.a = t2.b;
430430
EXPLAIN (COSTS OFF)
431431
SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_m t1 LEFT JOIN prt2_m t2 ON t1.c = t2.c;
432432

433-
-- partitionwise join can not be applied between tables with different
434-
-- partition lists
433+
-- partitionwise join can not be applied for a join between list and range
434+
-- partitioned tables
435435
EXPLAIN (COSTS OFF)
436436
SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 LEFT JOIN prt2_n t2 ON (t1.c = t2.c);
437+
438+
-- partitionwise join can not be applied between tables with different
439+
-- partition lists
437440
EXPLAIN (COSTS OFF)
438441
SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 JOIN prt2_n t2 ON (t1.c = t2.c) JOIN plt1 t3 ON (t1.c = t3.c);
439442

440-
-- partitionwise join can not be applied for a join between list and range
441-
-- partitioned tables
443+
-- partitionwise join can not be applied for a join between key column and
444+
-- non-key column
442445
EXPLAIN (COSTS OFF)
443446
SELECT t1.a, t1.c, t2.b, t2.c FROM prt1_n t1 FULL JOIN prt1 t2 ON (t1.c = t2.c);
444447

0 commit comments

Comments
 (0)