mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-08 11:57:51 +00:00
.
This commit is contained in:
parent
b2b614a686
commit
d6986b78a5
3 changed files with 19 additions and 13 deletions
14
rbf/array.go
14
rbf/array.go
|
|
@ -1,3 +1,17 @@
|
|||
// Copyright 2017 Pilosa Corp.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package rbf
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -939,6 +939,10 @@ func TestCursor_SplitBranchCells(t *testing.T) {
|
|||
}
|
||||
// adding one more container should split it
|
||||
tx.AddRoaring("x", rb(uint64(numContainers)))
|
||||
c, _ := tx.Cursor("x")
|
||||
c.First()
|
||||
c.Dump("test.dot")
|
||||
|
||||
after := &EasyWalker{tx: tx}
|
||||
rbf.Page(tx, 0, after)
|
||||
if after.String() != "RBLL" {
|
||||
|
|
|
|||
14
rbf/rbf.go
14
rbf/rbf.go
|
|
@ -161,11 +161,7 @@ func dataOffset(n int) int {
|
|||
}
|
||||
|
||||
func IsBitmapHeader(page []byte) bool {
|
||||
if readFlags(page) != PageTypeBitmapHeader {
|
||||
return false
|
||||
}
|
||||
// TODO(BBJ): Verify checksum.
|
||||
return true
|
||||
return readFlags(page) == PageTypeBitmapHeader
|
||||
}
|
||||
|
||||
type RootRecord struct {
|
||||
|
|
@ -255,14 +251,6 @@ type leafArgs leafCell
|
|||
func (c *leafCell) Size() int {
|
||||
return leafCellHeaderSize + len(c.Data)
|
||||
}
|
||||
func (c *leafCell) GetBitmap(tx *Tx) (pgno uint32, bm []uint64, err error) {
|
||||
pgno = toPgno(c.Data)
|
||||
page, err := tx.readPage(pgno)
|
||||
if err != nil {
|
||||
return 0, nil, err
|
||||
}
|
||||
return pgno, toArray64(page), err
|
||||
}
|
||||
|
||||
// Bitmap returns a bitmap representation of the cell data.
|
||||
func (c *leafCell) Bitmap(tx *Tx) []uint64 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue