indexwrapper

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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