mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
fixed upconvert;reverted to released interface
This commit is contained in:
parent
64e86614f8
commit
be3bc105cd
3 changed files with 9 additions and 9 deletions
|
|
@ -93,8 +93,8 @@ type updater struct {
|
|||
mapped bool
|
||||
}
|
||||
|
||||
func (btc *bTreeContainers) PutContainerValues(key uint64, containerType byte, n int32, mapped bool) {
|
||||
a := updater{key, n, containerType, mapped}
|
||||
func (btc *bTreeContainers) PutContainerValues(key uint64, containerType byte, n int, mapped bool) {
|
||||
a := updater{key, int32(n), containerType, mapped}
|
||||
btc.tree.Put(key, a.update)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,18 +46,18 @@ func (sc *sliceContainers) Put(key uint64, c *Container) {
|
|||
|
||||
}
|
||||
|
||||
func (sc *sliceContainers) PutContainerValues(key uint64, containerType byte, n int32, mapped bool) {
|
||||
func (sc *sliceContainers) PutContainerValues(key uint64, containerType byte, n int, mapped bool) {
|
||||
i := search64(sc.keys, key)
|
||||
if i < 0 {
|
||||
c := NewContainer()
|
||||
c.containerType = containerType
|
||||
c.n = n
|
||||
c.n = int32(n)
|
||||
c.mapped = mapped
|
||||
sc.insertAt(key, c, -i-1)
|
||||
} else {
|
||||
c := sc.containers[i]
|
||||
c.containerType = containerType
|
||||
c.n = n
|
||||
c.n = int32(n)
|
||||
c.mapped = mapped
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ type Containers interface {
|
|||
|
||||
// PutContainerValues updates an existing container at key.
|
||||
// If a container does not exist for key, a new one is allocated.
|
||||
PutContainerValues(key uint64, containerType byte, n int32, mapped bool)
|
||||
PutContainerValues(key uint64, containerType byte, n int, mapped bool)
|
||||
|
||||
// Remove takes the container at key out.
|
||||
Remove(key uint64)
|
||||
|
|
@ -644,7 +644,7 @@ func (b *Bitmap) unmarshalPilosaRoaring(data []byte) error {
|
|||
b.Containers.PutContainerValues(
|
||||
binary.LittleEndian.Uint64(buf[0:8]),
|
||||
byte(binary.LittleEndian.Uint16(buf[8:10])),
|
||||
int32(binary.LittleEndian.Uint16(buf[10:12]))+1,
|
||||
int(binary.LittleEndian.Uint16(buf[10:12]))+1,
|
||||
true)
|
||||
}
|
||||
opsOffset := headerSize + int(keyN)*12
|
||||
|
|
@ -1103,7 +1103,7 @@ func (c *Container) countRange(start, end int32) (n int32) {
|
|||
}
|
||||
|
||||
func (c *Container) arrayCountRange(start, end int32) (n int32) {
|
||||
i := int32(sort.Search(int(len(c.array)), func(i int) bool { return int32(c.array[i]) >= start }))
|
||||
i := int32(sort.Search(len(c.array), func(i int) bool { return int32(c.array[i]) >= start }))
|
||||
for ; i < int32(len(c.array)); i++ {
|
||||
v := int32(c.array[i])
|
||||
if v >= end {
|
||||
|
|
@ -3481,7 +3481,7 @@ func (b *Bitmap) UnmarshalBinary(data []byte) error {
|
|||
b.Containers.PutContainerValues(
|
||||
uint64(binary.LittleEndian.Uint16(buf[0:2])),
|
||||
containerTyper(i, card), /// container type voodo with isRunBitmap
|
||||
int32(card),
|
||||
card,
|
||||
true)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue