Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/backend/access/gin/ginpostinglist.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,17 @@ ginPostingListDecodeAllSegments(GinPostingList *segment, int len, int *ndecoded_
}

/* copy the first item */
/*
* Keep this commented out.
* See comments in itemptr_to_uint64().
*
* FIXME: Correct like this in other files (e.g., ginpostinglist.c and gist.c)
* if we can reproduce the cases.
*/
#if 0
Assert(OffsetNumberIsValid(ItemPointerGetOffsetNumber(&segment->first)));
Assert(ndecoded == 0 || ginCompareItemPointers(&segment->first, &result[ndecoded - 1]) > 0);
#endif
Assert(ndecoded == 0 || ginCompareItemPointers(&segment->first, &result[ndecoded - 1]) > 0);
result[ndecoded] = segment->first;
ndecoded++;

Expand Down
9 changes: 9 additions & 0 deletions src/test/regress/expected/gin.out
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,12 @@ select count(*) from t_gin_test_tbl where j @> '{}'::int[];
reset enable_seqscan;
reset enable_bitmapscan;
drop table t_gin_test_tbl;
--
-- Github issue: https://github.com/apache/cloudberry/issues/1222
--
begin;
create table t_issue_1222(i int4[]) with (appendonly=true);
create index t_issue_1222_idx on t_issue_1222 using gin (i)
with (fastupdate = on, gin_pending_list_limit = 4096);
insert into t_issue_1222 select array[1, 2, g] from generate_series(1, 400000) g;
abort;
9 changes: 9 additions & 0 deletions src/test/regress/expected/gin_optimizer.out
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,12 @@ select count(*) from t_gin_test_tbl where j @> '{}'::int[];
reset enable_seqscan;
reset enable_bitmapscan;
drop table t_gin_test_tbl;
--
-- Github issue: https://github.com/apache/cloudberry/issues/1222
--
begin;
create table t_issue_1222(i int4[]) with (appendonly=true);
create index t_issue_1222_idx on t_issue_1222 using gin (i)
with (fastupdate = on, gin_pending_list_limit = 4096);
insert into t_issue_1222 select array[1, 2, g] from generate_series(1, 400000) g;
abort;
10 changes: 10 additions & 0 deletions src/test/regress/sql/gin.sql
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,13 @@ reset enable_seqscan;
reset enable_bitmapscan;

drop table t_gin_test_tbl;

--
-- Github issue: https://github.com/apache/cloudberry/issues/1222
--
begin;
create table t_issue_1222(i int4[]) with (appendonly=true);
create index t_issue_1222_idx on t_issue_1222 using gin (i)
with (fastupdate = on, gin_pending_list_limit = 4096);
insert into t_issue_1222 select array[1, 2, g] from generate_series(1, 400000) g;
abort;
Loading