mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-09 06:31:02 +00:00
Optimize needs to use the new container logic
When calling `.optimize`, need to grab the new container which may be different from the original container.
This commit is contained in:
parent
973579e662
commit
372c369e7c
1 changed files with 4 additions and 6 deletions
|
|
@ -971,11 +971,9 @@ func (b *Bitmap) countEmptyContainers() int {
|
|||
|
||||
// Optimize converts array and bitmap containers to run containers as necessary.
|
||||
func (b *Bitmap) Optimize() {
|
||||
citer, _ := b.Containers.Iterator(0)
|
||||
for citer.Next() {
|
||||
_, c := citer.Value()
|
||||
c.optimize()
|
||||
}
|
||||
b.Containers.UpdateEvery(func(c *Container, existed bool) (*Container, bool) {
|
||||
return c.optimize(), true
|
||||
})
|
||||
}
|
||||
|
||||
type errWriter struct {
|
||||
|
|
@ -3519,7 +3517,7 @@ RUNLOOP:
|
|||
}
|
||||
}
|
||||
output := NewContainerRun(runs)
|
||||
output.optimize()
|
||||
output = output.optimize()
|
||||
return output
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue