Skip to content

Commit

Permalink
Fix pipeline failure
Browse files Browse the repository at this point in the history
  • Loading branch information
yjhjstz committed Dec 25, 2024
1 parent 9389da3 commit b50e6d1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
24 changes: 10 additions & 14 deletions src/test/regress/expected/bitmap_index.out
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,6 @@ select count(*) from bm_test_ao where i = 2;
(1 row)

DROP TABLE bm_test_ao;

--
-- test union bitmap batch words for multivalues index scan like where x in (x1, x2) or x > v
-- which creates bitmapand plan on two bitmap indexs that match multiple keys by using in in where clause
Expand All @@ -1010,9 +1009,10 @@ HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sur
insert into bmunion
select (r%53), (r%59)
from generate_series(1,70000) r;
create index i_bmtest2_a on bmunion using bitmap(a);
create index i_bmtest2_b on bmunion using bitmap(b);
create index bmu_i_bmtest2_a on bmunion using bitmap(a);
create index bmu_i_bmtest2_b on bmunion using bitmap(b);
insert into bmunion select 53, 1 from generate_series(1, 1000);
analyze bmunion;
set optimizer_enable_tablescan=off;
set optimizer_enable_dynamictablescan=off;
-- inject fault for planner so that it could produce bitmapand plan node.
Expand All @@ -1023,20 +1023,16 @@ select gp_inject_fault('simulate_bitmap_and', 'skip', dbid) from gp_segment_conf
(1 row)

explain (costs off) select count(*) from bmunion where a = 53 and b < 3;
QUERY PLAN
----------------------------------------------------------------
QUERY PLAN
---------------------------------------------------------------
Finalize Aggregate
-> Gather Motion 3:1 (slice1; segments: 3)
-> Gather Motion 1:1 (slice1; segments: 1)
-> Partial Aggregate
-> Bitmap Heap Scan on bmunion
Recheck Cond: ((b < 3) AND (a = 53))
-> BitmapAnd
-> Bitmap Index Scan on i_bmtest2_b
Index Cond: (b < 3)
-> Bitmap Index Scan on i_bmtest2_a
Index Cond: (a = 53)
-> Index Scan using bmu_i_bmtest2_a on bmunion
Index Cond: (a = 53)
Filter: (b < 3)
Optimizer: Postgres query optimizer
(11 rows)
(7 rows)

select gp_inject_fault('simulate_bitmap_and', 'reset', dbid) from gp_segment_configuration where role = 'p' and content = -1;
gp_inject_fault
Expand Down
12 changes: 6 additions & 6 deletions src/test/regress/expected/bitmap_index_optimizer.out
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,6 @@ select count(*) from bm_test_ao where i = 2;
(1 row)

DROP TABLE bm_test_ao;

--
-- test union bitmap batch words for multivalues index scan like where x in (x1, x2) or x > v
-- which creates bitmapand plan on two bitmap indexs that match multiple keys by using in in where clause
Expand All @@ -1017,9 +1016,10 @@ HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sur
insert into bmunion
select (r%53), (r%59)
from generate_series(1,70000) r;
create index i_bmtest2_a on bmunion using bitmap(a);
create index i_bmtest2_b on bmunion using bitmap(b);
create index bmu_i_bmtest2_a on bmunion using bitmap(a);
create index bmu_i_bmtest2_b on bmunion using bitmap(b);
insert into bmunion select 53, 1 from generate_series(1, 1000);
analyze bmunion;
set optimizer_enable_tablescan=off;
set optimizer_enable_dynamictablescan=off;
-- inject fault for planner so that it could produce bitmapand plan node.
Expand All @@ -1031,16 +1031,16 @@ select gp_inject_fault('simulate_bitmap_and', 'skip', dbid) from gp_segment_conf

explain (costs off) select count(*) from bmunion where a = 53 and b < 3;
QUERY PLAN
----------------------------------------------------------------
--------------------------------------------------------------------
Finalize Aggregate
-> Gather Motion 1:1 (slice1; segments: 1)
-> Partial Aggregate
-> Bitmap Heap Scan on bmunion
Recheck Cond: ((a = 53) AND (b < 3))
-> BitmapAnd
-> Bitmap Index Scan on i_bmtest2_a
-> Bitmap Index Scan on bmu_i_bmtest2_a
Index Cond: (a = 53)
-> Bitmap Index Scan on i_bmtest2_b
-> Bitmap Index Scan on bmu_i_bmtest2_b
Index Cond: (b < 3)
Optimizer: Pivotal Optimizer (GPORCA)
(11 rows)
Expand Down
5 changes: 3 additions & 2 deletions src/test/regress/sql/bitmap_index.sql
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,10 @@ create table bmunion (a int, b int);
insert into bmunion
select (r%53), (r%59)
from generate_series(1,70000) r;
create index i_bmtest2_a on bmunion using bitmap(a);
create index i_bmtest2_b on bmunion using bitmap(b);
create index bmu_i_bmtest2_a on bmunion using bitmap(a);
create index bmu_i_bmtest2_b on bmunion using bitmap(b);
insert into bmunion select 53, 1 from generate_series(1, 1000);
analyze bmunion;

set optimizer_enable_tablescan=off;
set optimizer_enable_dynamictablescan=off;
Expand Down

0 comments on commit b50e6d1

Please sign in to comment.