Fix bitmap bug when delete without expression (#10325)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
pull/10344/head
yukun 2021-10-21 11:01:07 +08:00 committed by GitHub
parent f15dc150f1
commit ac581c5a38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -127,6 +127,9 @@ SegmentGrowingImpl::get_filtered_bitmap(const BitsetView& bitset, int64_t ins_ba
}
AssertInfo(bitmap_holder, "bitmap_holder is null");
auto deleted_bitmap = bitmap_holder->bitmap_ptr;
if (bitset.size() == 0) {
return BitsetView(deleted_bitmap);
}
AssertInfo(deleted_bitmap->count() == bitset.size(), "Deleted bitmap count not equal to filtered bitmap count");
auto filtered_bitmap = std::make_shared<faiss::ConcurrentBitset>(bitset.size(), bitset.data());