index

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FuseFilterError = "too many iterations, you probably have duplicate keys"

Variables

View Source
var (
	ErrNotFound  = moerr.NewInternalErrorNoCtx("tae index: key not found")
	ErrDuplicate = moerr.NewInternalErrorNoCtx("tae index: key duplicate")
	ErrWrongType = moerr.NewInternalErrorNoCtx("tae index: wrong type")
)

Functions

func NewSimpleARTMap

func NewSimpleARTMap(typ types.Type) *simpleARTMap

Types

type BatchResp

type BatchResp struct {
	UpdatedKeys *roaring.Bitmap
	UpdatedRows *roaring.Bitmap
}

type IndexMVCCChain added in v0.6.0

type IndexMVCCChain struct {
	MVCC []uint32
}

func NewIndexMVCCChain added in v0.6.0

func NewIndexMVCCChain() *IndexMVCCChain

func (*IndexMVCCChain) GetRows added in v0.6.0

func (chain *IndexMVCCChain) GetRows() []uint32

func (*IndexMVCCChain) Insert added in v0.6.0

func (chain *IndexMVCCChain) Insert(node uint32)

type KeysCtx

type KeysCtx struct {
	Keys containers.Vector

	// Select the key where this bitmap indicates.
	// Nil to select all
	Selects *roaring.Bitmap
	// Select a continuous interval [Start, Start+Count) from keys
	Start, Count int

	// Whether need to verify Keys
	NeedVerify bool
}

func (*KeysCtx) SelectAll

func (ctx *KeysCtx) SelectAll()

type SecondaryIndex

type SecondaryIndex interface {
	Insert(key any, offset uint32) (err error)
	BatchInsert(keys *KeysCtx, startRow uint32) (err error)
	Delete(key any) (old uint32, err error)
	Search(key any) ([]uint32, error)
	String() string
	Size() int
}

type StaticFilter

type StaticFilter interface {
	MayContainsKey(key any) (bool, error)
	MayContainsAnyKeys(keys containers.Vector, visibility *roaring.Bitmap) (bool, *roaring.Bitmap, error)
	Marshal() ([]byte, error)
	Unmarshal(buf []byte) error
	GetMemoryUsage() uint32
	Print() string
}

func NewBinaryFuseFilter

func NewBinaryFuseFilter(data containers.Vector) (StaticFilter, error)

func NewBinaryFuseFilterFromSource

func NewBinaryFuseFilterFromSource(data []byte) (StaticFilter, error)

type ZoneMap

type ZoneMap struct {
	// contains filtered or unexported fields
}

func NewZoneMap

func NewZoneMap(typ types.Type) *ZoneMap

func (*ZoneMap) BatchUpdate

func (zm *ZoneMap) BatchUpdate(KeysCtx *KeysCtx) error

func (*ZoneMap) Contains

func (zm *ZoneMap) Contains(key any) (ok bool)

func (*ZoneMap) ContainsAny

func (zm *ZoneMap) ContainsAny(keys containers.Vector) (visibility *roaring.Bitmap, ok bool)

func (*ZoneMap) FastContainsAny added in v0.7.0

func (zm *ZoneMap) FastContainsAny(keys containers.Vector) (ok bool)

func (*ZoneMap) GetMax

func (zm *ZoneMap) GetMax() any

func (*ZoneMap) GetMemoryUsage

func (zm *ZoneMap) GetMemoryUsage() uint64

func (*ZoneMap) GetMin

func (zm *ZoneMap) GetMin() any

func (*ZoneMap) GetType

func (zm *ZoneMap) GetType() types.Type

func (*ZoneMap) Marshal

func (zm *ZoneMap) Marshal() (buf []byte, err error)

func (*ZoneMap) SetMax

func (zm *ZoneMap) SetMax(v any)

func (*ZoneMap) SetMin

func (zm *ZoneMap) SetMin(v any)

func (*ZoneMap) String added in v0.7.0

func (zm *ZoneMap) String() string

func (*ZoneMap) Unmarshal

func (zm *ZoneMap) Unmarshal(buf []byte) error

func (*ZoneMap) Update

func (zm *ZoneMap) Update(v any) (err error)

Jump to

Keyboard shortcuts

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