Skip to content

Commit c6b87f7

Browse files
Tao-Mamy-ship-it
authored andcommitted
FIXME: It looks like PostgreSQL planner pruning feature does not work properly
The partition_pruning test stated GP6 introduced the pruning issue. Please refer the commit 3ea5477 to solve the pruning bug in PostgreSQL planner.
1 parent 64d6802 commit c6b87f7

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/test/regress/expected/partition_pruning.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ explain select * from parttab where length(n::text) = 3;
3838
---------------------------------------------------------------------------------
3939
Gather Motion 3:1 (slice1; segments: 3) (cost=0.00..533.04 rows=70 width=64)
4040
-> Append (cost=0.00..532.12 rows=23 width=64)
41-
-> Seq Scan on parttab_1_prt_one (cost=0.00..266.00 rows=12 width=64)
41+
-> Seq Scan on parttab_1_prt_one parttab_1 (cost=0.00..266.00 rows=12 width=64)
4242
Filter: (length((n)::text) = 3)
43-
-> Seq Scan on parttab_1_prt_two (cost=0.00..266.00 rows=12 width=64)
43+
-> Seq Scan on parttab_1_prt_two parttab_2 (cost=0.00..266.00 rows=12 width=64)
4444
Filter: (length((n)::text) = 3)
4545
Optimizer: Postgres query optimizer
4646
(7 rows)

src/test/regress/expected/qp_dropped_cols.out

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14977,30 +14977,30 @@ EXPLAIN (costs off) SELECT * FROM ds_main, non_part2 WHERE ds_main.c = non_part2
1497714977
QUERY PLAN
1497814978
---------------------------------------------------------------------------------------------------
1497914979
Gather Motion 3:1 (slice1; segments: 3)
14980-
Merge Key: ds_main_1_prt_2.a
14980+
Merge Key: ds_main.a
1498114981
-> Sort
14982-
Sort Key: ds_main_1_prt_2.a
14982+
Sort Key: ds_main.a
1498314983
-> HashAggregate
1498414984
Group Key: (RowIdExpr)
1498514985
-> Redistribute Motion 3:3 (slice2; segments: 3)
1498614986
Hash Key: (RowIdExpr)
1498714987
-> Nested Loop
1498814988
-> Broadcast Motion 3:3 (slice3; segments: 3)
1498914989
-> Hash Join
14990-
Hash Cond: (ds_main_1_prt_2.c = non_part2.e)
14990+
Hash Cond: (ds_main.c = non_part2.e)
1499114991
-> Append
1499214992
Partition Selectors: $0
14993-
-> Seq Scan on ds_main_1_prt_2
14993+
-> Seq Scan on ds_main_1_prt_2 ds_main_1
1499414994
Filter: (a IS NOT NULL)
14995-
-> Seq Scan on ds_main_1_prt_3
14995+
-> Seq Scan on ds_main_1_prt_3 ds_main_2
1499614996
Filter: (a IS NOT NULL)
14997-
-> Seq Scan on ds_main_1_prt_4
14997+
-> Seq Scan on ds_main_1_prt_4 ds_main_3
1499814998
Filter: (a IS NOT NULL)
14999-
-> Seq Scan on ds_main_1_prt_5
14999+
-> Seq Scan on ds_main_1_prt_5 ds_main_4
1500015000
Filter: (a IS NOT NULL)
15001-
-> Seq Scan on ds_main_1_prt_6
15001+
-> Seq Scan on ds_main_1_prt_6 ds_main_5
1500215002
Filter: (a IS NOT NULL)
15003-
-> Seq Scan on ds_main_1_prt_deflt
15003+
-> Seq Scan on ds_main_1_prt_deflt ds_main_6
1500415004
Filter: (a IS NOT NULL)
1500515005
-> Hash
1500615006
-> Partition Selector (selector id: $0)

0 commit comments

Comments
 (0)