-
Notifications
You must be signed in to change notification settings - Fork 242
Expand file tree
/
Copy pathdelete_bloom_stats.out
More file actions
60 lines (57 loc) · 2.82 KB
/
Copy pathdelete_bloom_stats.out
File metadata and controls
60 lines (57 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
-- Regression test for issue #1749:
-- PAX DELETE crashes with SIGSEGV when bloomfilter_columns are not a
-- subset of minmax_columns. The stats refresh inside
-- DeleteWithVisibilityMap must project every column it reads.
-- Case 1: bloomfilter column (payload) is NOT in minmax_columns.
-- Pre-fix: segment crashed on DELETE.
drop table if exists pax_delete_bloom_crash;
NOTICE: table "pax_delete_bloom_crash" does not exist, skipping
create table pax_delete_bloom_crash (id int, k int, payload text)
using pax
with (minmax_columns = 'id', bloomfilter_columns = 'payload');
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
insert into pax_delete_bloom_crash
select i, i % 10, 'payload-' || i::text
from generate_series(1, 10000) as i;
delete from pax_delete_bloom_crash where id between 1 and 100;
select count(*) from pax_delete_bloom_crash;
count
-------
9900
(1 row)
drop table pax_delete_bloom_crash;
-- Case 2: bloomfilter only, no minmax columns.
drop table if exists pax_delete_bf_only;
NOTICE: table "pax_delete_bf_only" does not exist, skipping
create table pax_delete_bf_only (id int, payload text)
using pax
with (bloomfilter_columns = 'payload');
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
insert into pax_delete_bf_only
select i, 'payload-' || i::text from generate_series(1, 5000) as i;
delete from pax_delete_bf_only where id between 1 and 50;
select count(*) from pax_delete_bf_only;
count
-------
4950
(1 row)
drop table pax_delete_bf_only;
-- Case 3: minmax and bloomfilter columns overlap but neither is a subset.
drop table if exists pax_delete_mm_bf_mixed;
NOTICE: table "pax_delete_mm_bf_mixed" does not exist, skipping
create table pax_delete_mm_bf_mixed (id int, k int, payload text)
using pax
with (minmax_columns = 'id,payload', bloomfilter_columns = 'k,payload');
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
insert into pax_delete_mm_bf_mixed
select i, i % 7, 'p-' || i::text from generate_series(1, 5000) as i;
delete from pax_delete_mm_bf_mixed where id between 1 and 50;
select count(*) from pax_delete_mm_bf_mixed;
count
-------
4950
(1 row)
drop table pax_delete_mm_bf_mixed;