gpdb
gpdb copied to clipboard
Fix Bitmap index null-array condition failed
when we create bitmap-index on column and using bitmap index scan with NULL array condition on this column, then failed. Like this:
create temp table foo (a int); create index foo_i on foo using bitmap(a);
select * from foo where a = any(null::int[]); Conversant: ERROR "unrecognized result from subplan (nodeBitmapHeapscan.c:293)"
The reason is when we using bitmap-index scan on NULL Array key condition, MultiExecbitmapscan treate it as runtime key then it will return NULL to parent node. But for parent node like BitmapHeapNext cannot handle NULL return, then error happened. So we should return an empty bitmap instead of nothing to upper node(BitmapHeapNext), and force BitmapHeapNext scan this empty bitmap.
Here are some reminders before you submit the pull request
- [ ] Add tests for the change
- [ ] Document changes
- [ ] Communicate in the mailing list if needed
- [ ] Pass
make installcheck
- [ ] Review a PR in return to support the community
Just a reminder that the commit message also needs to be filled with detail description of the change before merging.