index

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 19 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 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)
	MayContainsAny(keys *vector.Vector, lowerBound int, upperBound int) bool
	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) AnyGEByValue added in v1.2.0

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

zm.min >= k

func (ZM) AnyGT added in v0.8.0

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

func (ZM) AnyGTByValue added in v1.2.0

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

zm.max > k

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) AnyLEByValue added in v1.2.0

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

zm.min <= k

func (ZM) AnyLT added in v0.8.0

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

func (ZM) AnyLTByValue added in v1.2.0

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

zm.min < k

func (ZM) Between added in v1.2.0

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

func (ZM) Clone added in v0.8.0

func (zm ZM) Clone() ZM

func (ZM) CompareMax added in v1.2.0

func (zm ZM) CompareMax(o ZM) int

caller need to do compareCheck

func (ZM) CompareMin added in v1.2.0

func (zm ZM) CompareMin(o ZM) int

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) SetMaxTruncated added in v1.2.0

func (zm ZM) SetMaxTruncated()

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) StringForHex added in v1.2.0

func (zm ZM) StringForHex() string

func (ZM) SubVecIn added in v1.2.0

func (zm ZM) SubVecIn(vec *vector.Vector) (int, int)

anyIn has been called, so there must be a subvector in this zonemap return lower bound and upper bound

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