Skip to content

Commit

Permalink
FIXME: It looks like PostgreSQL planner pruning feature does not work…
Browse files Browse the repository at this point in the history
… properly

The partition_pruning test stated GP6 introduced the pruning issue. Please refer the commit 3ea5477 to solve the pruning bug in PostgreSQL planner.
  • Loading branch information
Tao-Ma authored and my-ship-it committed Jan 3, 2025
1 parent 64d6802 commit c6b87f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/test/regress/expected/partition_pruning.out
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ explain select * from parttab where length(n::text) = 3;
---------------------------------------------------------------------------------
Gather Motion 3:1 (slice1; segments: 3) (cost=0.00..533.04 rows=70 width=64)
-> Append (cost=0.00..532.12 rows=23 width=64)
-> Seq Scan on parttab_1_prt_one (cost=0.00..266.00 rows=12 width=64)
-> Seq Scan on parttab_1_prt_one parttab_1 (cost=0.00..266.00 rows=12 width=64)
Filter: (length((n)::text) = 3)
-> Seq Scan on parttab_1_prt_two (cost=0.00..266.00 rows=12 width=64)
-> Seq Scan on parttab_1_prt_two parttab_2 (cost=0.00..266.00 rows=12 width=64)
Filter: (length((n)::text) = 3)
Optimizer: Postgres query optimizer
(7 rows)
Expand Down
18 changes: 9 additions & 9 deletions src/test/regress/expected/qp_dropped_cols.out
Original file line number Diff line number Diff line change
Expand Up @@ -14977,30 +14977,30 @@ EXPLAIN (costs off) SELECT * FROM ds_main, non_part2 WHERE ds_main.c = non_part2
QUERY PLAN
---------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice1; segments: 3)
Merge Key: ds_main_1_prt_2.a
Merge Key: ds_main.a
-> Sort
Sort Key: ds_main_1_prt_2.a
Sort Key: ds_main.a
-> HashAggregate
Group Key: (RowIdExpr)
-> Redistribute Motion 3:3 (slice2; segments: 3)
Hash Key: (RowIdExpr)
-> Nested Loop
-> Broadcast Motion 3:3 (slice3; segments: 3)
-> Hash Join
Hash Cond: (ds_main_1_prt_2.c = non_part2.e)
Hash Cond: (ds_main.c = non_part2.e)
-> Append
Partition Selectors: $0
-> Seq Scan on ds_main_1_prt_2
-> Seq Scan on ds_main_1_prt_2 ds_main_1
Filter: (a IS NOT NULL)
-> Seq Scan on ds_main_1_prt_3
-> Seq Scan on ds_main_1_prt_3 ds_main_2
Filter: (a IS NOT NULL)
-> Seq Scan on ds_main_1_prt_4
-> Seq Scan on ds_main_1_prt_4 ds_main_3
Filter: (a IS NOT NULL)
-> Seq Scan on ds_main_1_prt_5
-> Seq Scan on ds_main_1_prt_5 ds_main_4
Filter: (a IS NOT NULL)
-> Seq Scan on ds_main_1_prt_6
-> Seq Scan on ds_main_1_prt_6 ds_main_5
Filter: (a IS NOT NULL)
-> Seq Scan on ds_main_1_prt_deflt
-> Seq Scan on ds_main_1_prt_deflt ds_main_6
Filter: (a IS NOT NULL)
-> Hash
-> Partition Selector (selector id: $0)
Expand Down

0 comments on commit c6b87f7

Please sign in to comment.