mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-06 00:25:55 +00:00
fix for #770
This commit is contained in:
parent
5a0eea2948
commit
7bcbfaef09
1 changed files with 5 additions and 0 deletions
|
|
@ -197,6 +197,7 @@ func (b *Bitmap) CountRange(start, end uint64) (n uint64) {
|
|||
if len(b.keys) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
skey := highbits(start)
|
||||
ekey := highbits(end)
|
||||
|
||||
|
|
@ -233,7 +234,11 @@ func (b *Bitmap) CountRange(start, end uint64) (n uint64) {
|
|||
|
||||
// Count containers in between.
|
||||
for x := i + 1; x < j; x++ {
|
||||
if ekey < b.keys[x] {
|
||||
break
|
||||
}
|
||||
n += uint64(b.containers[x].n)
|
||||
|
||||
}
|
||||
|
||||
return n
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue