mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 07:11:02 +00:00
make sure roaring.Bitmaps are created appropriately
This commit is contained in:
parent
d798963798
commit
a42a1a2c37
1 changed files with 2 additions and 1 deletions
|
|
@ -189,11 +189,12 @@ func (b *Bitmap) createSegmentIfNotExists(slice uint64) *BitmapSegment {
|
|||
}
|
||||
|
||||
// Insert new segment.
|
||||
b.segments = append(b.segments, BitmapSegment{})
|
||||
b.segments = append(b.segments, BitmapSegment{data: *roaring.NewBitmap()})
|
||||
if i < len(b.segments) {
|
||||
copy(b.segments[i+1:], b.segments[i:])
|
||||
}
|
||||
b.segments[i] = BitmapSegment{
|
||||
data: *roaring.NewBitmap(),
|
||||
slice: slice,
|
||||
writable: true,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue