ro2

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ArrayMaxSize represents the maximum size of array containers.
	// This is sligtly less than roaring to accommodate the page header.
	ArrayMaxSize = 4079

	// RLEMaxSize represents the maximum size of run length encoded containers.
	RLEMaxSize = 2039
)

Variables

View Source
var Merge = &pebble.Merger{
	Name: "pilosa.RoaringBitmap",
	Merge: func(key, value []byte) (pebble.ValueMerger, error) {
		co := DecodeContainer(value).Clone()
		return (*Merger)(co), nil
	},
}
View Source
var NewBitmap = roaring.NewBitmap
View Source
var NewBitmapBitmapFilter = roaring.NewBitmapBitmapFilter
View Source
var NewBitmapRowsUnion = roaring.NewBitmapRowsUnion

Functions

func Apply added in v1.8.0

func Apply(ra *Bitmap, filter roaring.BitmapFilter) error

func DecodeContainer added in v1.8.0

func DecodeContainer(value []byte) *roaring.Container

func EncodeContainer added in v1.8.0

func EncodeContainer(c *roaring.Container) []byte

func LastValue added in v1.8.0

func LastValue(value []byte) uint16

func ReadDistinctBSI added in v1.8.0

func ReadDistinctBSI(ra Reader, shard uint64, filterBitmap *Bitmap) *roaring.Bitmap

func ReadMutex added in v1.8.0

func ReadMutex(ra Reader, shard uint64, filterBitmap *Bitmap, match func(row uint64, ra *Bitmap))

func ReadSum added in v1.8.0

func ReadSum(ra Reader, match *Bitmap) (count int32, total int64)

func WriteBSI added in v1.8.0

func WriteBSI(ra *Bitmap, id uint64, svalue int64)

func WriteBool added in v1.8.0

func WriteBool(ra *Bitmap, id uint64, value bool)

func WriteMutex added in v1.8.0

func WriteMutex(ra *Bitmap, id uint64, value uint64)

Types

type Bitmap added in v1.8.0

type Bitmap = roaring.Bitmap

func Existence added in v1.8.0

func Existence(tx OffsetRanger, shard uint64) *Bitmap

func Range added in v1.8.0

func Range(tx OffsetRanger, op OP, shard, bitDepth uint64, predicate, end int64) *Bitmap

Range returns bitmaps with a bsiGroup value encoding matching the predicate.

func ReadFalse added in v1.8.0

func ReadFalse(ra Reader, shard uint64, match *Bitmap) *Bitmap

func ReadTrue added in v1.8.0

func ReadTrue(ra Reader, shard uint64, match *Bitmap) *Bitmap

func Row added in v1.8.0

func Row(ra OffsetRanger, shard, rowID uint64) *Bitmap

type BitmapRowsUnion added in v1.8.0

type BitmapRowsUnion = roaring.BitmapRowsUnion

type ContainerType added in v1.8.0

type ContainerType int
const (
	ContainerTypeArray ContainerType = 1 + iota
	ContainerTypeRLE
	ContainerTypeBitmap
)

Container types.

type Merger added in v1.8.0

type Merger roaring.Container

func (*Merger) Finish added in v1.8.0

func (m *Merger) Finish(includesBase bool) ([]byte, io.Closer, error)

func (*Merger) MergeNewer added in v1.8.0

func (m *Merger) MergeNewer(value []byte) error

func (*Merger) MergeOlder added in v1.8.0

func (m *Merger) MergeOlder(value []byte) error

type OP added in v1.8.0

type OP byte
const (
	EQ  OP = 1 + iota // ==
	NEQ               // !=
	LT                // <
	LTE               // <=
	GT                // >
	GTE               // >=

	BETWEEN // ><  (this is like a <= x <= b)
)

type OffsetRanger added in v1.8.0

type OffsetRanger interface {
	OffsetRange(offset, start, end uint64) *Bitmap
}

type Reader added in v1.8.0

type Reader interface {
	Seek(key uint64) bool
	Valid() bool
	Next() bool
	Value() (uint64, *roaring.Container)
	Max() uint64
	OffsetRange(offset, start, end uint64) *Bitmap
	ApplyFilter(key uint64, filter roaring.BitmapFilter) (err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL