index

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const FuseFilterError = "too many iterations, you probably have duplicate keys"
View Source
const (
	ZMSize = 64
)

Variables

View Source
var (
	ErrNotFound  = moerr.NewInternalErrorNoCtx("tae index: key not found")
	ErrDuplicate = moerr.NewInternalErrorNoCtx("tae index: key duplicate")
)
View Source
var MaxBytesValue []byte

Functions

func BatchUpdateZM added in v0.8.0

func BatchUpdateZM(zm ZM, vec *vector.Vector) (err error)

func DecodeBloomFilter added in v0.8.0

func DecodeBloomFilter(sf StaticFilter, data []byte) error

func EncodeZM added in v0.8.0

func EncodeZM(zm *ZM) []byte

func MustZMToVector added in v0.8.0

func MustZMToVector(zm ZM, vec *vector.Vector, m *mpool.MPool) *vector.Vector

func NewSimpleARTMap

func NewSimpleARTMap() *simpleARTMap

func PrefixCompare added in v1.1.0

func PrefixCompare(lhs, rhs []byte) int

func SetZMSum added in v1.0.0

func SetZMSum(zm ZM, vec *vector.Vector)

func UpdateZM added in v0.8.0

func UpdateZM(zm ZM, v []byte)

func UpdateZMAny added in v0.8.0

func UpdateZMAny(zm ZM, v any)

it is only used for test

func ZMToVector added in v0.8.0

func ZMToVector(zm ZM, vec *vector.Vector, m *mpool.MPool) (*vector.Vector, error)

if zm is not initialized, return a const null vector if zm is of type varlen and truncated, the max value is null

Types

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 SecondaryIndex

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

type StaticFilter

type StaticFilter interface {
	MayContainsKey(key []byte) (bool, error)
	MayContainsAnyKeys(keys containers.Vector) (bool, *nulls.Bitmap, error)
	Marshal() ([]byte, error)
	Unmarshal(buf []byte) error
	String() string
}

func NewBinaryFuseFilter

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

func NewBinaryFuseFilterByVectors added in v0.8.0

func NewBinaryFuseFilterByVectors(datas []containers.Vector) (StaticFilter, error)

func NewEmptyBinaryFuseFilter added in v0.8.0

func NewEmptyBinaryFuseFilter() StaticFilter

type ZM added in v0.8.0

type ZM []byte

func BuildZM added in v0.8.0

func BuildZM(t types.T, v []byte) ZM

func DecodeZM added in v0.8.0

func DecodeZM(buf []byte) ZM

func NewZM added in v0.8.0

func NewZM(t types.T, scale int32) ZM

func SetBool added in v0.8.0

func SetBool(zm ZM, v bool) ZM

func VectorToZM added in v0.8.0

func VectorToZM(vec *vector.Vector, zm ZM) ZM

if zm is not of length 2, return not initilized zm

func ZMMinus added in v0.8.0

func ZMMinus(v1, v2, res ZM) ZM

max = v1.max-v2.min min = v1.max-v2.min

func ZMMulti added in v0.8.0

func ZMMulti(v1, v2, res ZM) ZM

v1 product v2 => p[r0,r1,r2,r3] min,max = Min(p),Max(p)

func ZMPlus added in v0.8.0

func ZMPlus(v1, v2, res ZM) ZM

max = v1.max+v2.max min = v1.min+v2.min

func (ZM) And added in v0.8.0

func (zm ZM) And(o ZM) (res bool, ok bool)

both zm should be of type bool, otherwise, ok is false res is true only when zm.min == true and o.min == true

func (ZM) AnyBetween added in v1.1.1

func (zm ZM) AnyBetween(lb, ub ZM) (res bool, ok bool)

func (ZM) AnyGE added in v0.8.0

func (zm ZM) AnyGE(o ZM) (res bool, ok bool)

func (ZM) AnyGT added in v0.8.0

func (zm ZM) AnyGT(o ZM) (res bool, ok bool)

func (ZM) AnyIn added in v0.8.0

func (zm ZM) AnyIn(vec *vector.Vector) bool

func (ZM) AnyLE added in v0.8.0

func (zm ZM) AnyLE(o ZM) (res bool, ok bool)

func (ZM) AnyLT added in v0.8.0

func (zm ZM) AnyLT(o ZM) (res bool, ok bool)

func (ZM) Clone added in v0.8.0

func (zm ZM) Clone() ZM

func (ZM) Contains added in v0.8.0

func (zm ZM) Contains(k any) bool

TODO: remove me later

func (ZM) ContainsKey added in v0.8.0

func (zm ZM) ContainsKey(k []byte) bool

func (ZM) Encode added in v0.8.0

func (zm ZM) Encode() []byte

func (ZM) FastContainsAny added in v0.8.0

func (zm ZM) FastContainsAny(keys *vector.Vector) (ok bool)

func (ZM) FastIntersect added in v0.8.0

func (zm ZM) FastIntersect(o ZM) (res bool)

func (ZM) GetBuf added in v0.8.0

func (zm ZM) GetBuf() []byte

func (ZM) GetMax added in v0.8.0

func (zm ZM) GetMax() any

func (ZM) GetMaxBuf added in v0.8.0

func (zm ZM) GetMaxBuf() []byte

func (ZM) GetMin added in v0.8.0

func (zm ZM) GetMin() any

func (ZM) GetMinBuf added in v0.8.0

func (zm ZM) GetMinBuf() []byte

func (ZM) GetScale added in v0.8.0

func (zm ZM) GetScale() int32

func (ZM) GetSum added in v1.0.0

func (zm ZM) GetSum() any

func (ZM) GetSumBuf added in v1.0.0

func (zm ZM) GetSumBuf() []byte

func (ZM) GetType added in v0.8.0

func (zm ZM) GetType() types.T

func (ZM) HasSum added in v1.0.0

func (zm ZM) HasSum() bool

func (ZM) Intersect added in v0.8.0

func (zm ZM) Intersect(o ZM) (res bool, ok bool)

func (ZM) IsArray added in v1.1.0

func (zm ZM) IsArray() bool

func (ZM) IsInited added in v0.8.0

func (zm ZM) IsInited() bool

func (ZM) IsString added in v0.8.0

func (zm ZM) IsString() bool

func (ZM) Marshal added in v0.8.0

func (zm ZM) Marshal() ([]byte, error)

func (ZM) MaxTruncated added in v0.8.0

func (zm ZM) MaxTruncated() bool

func (ZM) Or added in v0.8.0

func (zm ZM) Or(o ZM) (res bool, ok bool)

both zm should be of type bool, otherwise, ok is false res is false only when zm.max == false and o.max == false

func (ZM) PrefixBetween added in v1.1.1

func (zm ZM) PrefixBetween(lb, ub []byte) bool

func (ZM) PrefixEq added in v1.1.0

func (zm ZM) PrefixEq(s []byte) bool

func (ZM) PrefixIn added in v1.1.0

func (zm ZM) PrefixIn(vec *vector.Vector) bool

func (ZM) Reset added in v0.8.0

func (zm ZM) Reset()

func (ZM) ResetMinMax added in v0.8.0

func (zm ZM) ResetMinMax()

func (ZM) SetScale added in v0.8.0

func (zm ZM) SetScale(scale int32)

func (ZM) SetSum added in v1.0.0

func (zm ZM) SetSum(v []byte)

func (ZM) SetType added in v0.8.0

func (zm ZM) SetType(t types.T)

func (ZM) String added in v0.8.0

func (zm ZM) String() string

func (ZM) StringForCompose added in v1.0.0

func (zm ZM) StringForCompose() string

func (ZM) Unmarshal added in v0.8.0

func (zm ZM) Unmarshal(buf []byte) (err error)

func (ZM) Update added in v0.8.0

func (zm ZM) Update(v any) (err error)

TODO: remove me later

func (ZM) Valid added in v0.8.0

func (zm ZM) Valid() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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