indexwrapper

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslateError

func TranslateError(err error) error

Types

type ImmutIndex

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

func NewImmutIndex

func NewImmutIndex(
	zm index.ZM,
	bf objectio.BloomFilter,
	location objectio.Location,
) ImmutIndex

func (ImmutIndex) BatchDedup

func (idx ImmutIndex) BatchDedup(
	ctx context.Context,
	keys containers.Vector,
	keysZM index.ZM,
	rt *dbutils.Runtime,
) (sels *nulls.Bitmap, err error)

func (ImmutIndex) Dedup

func (idx ImmutIndex) Dedup(
	ctx context.Context, key any, rt *dbutils.Runtime,
) (err error)

type MutIndex

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

func NewMutIndex

func NewMutIndex(typ types.Type) *MutIndex

func (*MutIndex) BatchDedup

func (idx *MutIndex) BatchDedup(
	ctx context.Context,
	keys *vector.Vector,
	keysZM index.ZM,
	skipfn func(row uint32) (err error),
	_ objectio.BloomFilter,
) (keyselects *roaring.Bitmap, err error)

func (*MutIndex) BatchUpsert

func (idx *MutIndex) BatchUpsert(
	keys *vector.Vector,
	offset int,
) (err error)

BatchUpsert batch insert the specific keys If any deduplication, it will fetch the old value first, fill the active map with new value, insert the old value into delete map If any other unknown error hanppens, return error

func (*MutIndex) Close

func (idx *MutIndex) Close() error

func (*MutIndex) Dedup

func (idx *MutIndex) Dedup(ctx context.Context, key any, skipfn func(row uint32) (err error)) (err error)

Dedup returns wether the specified key is existed If key is existed, return ErrDuplicate If any other unknown error happens, return error If key is not found, return nil

func (*MutIndex) GetActiveRow

func (idx *MutIndex) GetActiveRow(key any) (row []uint32, err error)

func (*MutIndex) String

func (idx *MutIndex) String() string

Jump to

Keyboard shortcuts

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