Documentation
¶
Index ¶
- Variables
- func BlockZoneMapIndexConstructor(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
- func BuildBitSlicedIndex(data []*vector.Vector, t types.Type, colIdx int16, startPos int) (bsi.BitSlicedIndex, error)
- func NewNumericBsiEmptyNode(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
- func NewStringBsiEmptyNode(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
- func NumericBsiIndexConstructor(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
- func SegmentZoneMapIndexConstructor(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
- func StringBsiIndexConstructor(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
- type BlockHoldersManager
- type BlockIndexHolder
- func (holder *BlockIndexHolder) AllocateVersion(colIdx int) uint64
- func (holder *BlockIndexHolder) Count(colIdx int, filter *roaring.Bitmap) (uint64, error)
- func (holder *BlockIndexHolder) DropIndex(filename string)
- func (holder *BlockIndexHolder) EvalFilter(colIdx int, ctx *FilterCtx) error
- func (holder *BlockIndexHolder) IndicesCount() int
- func (holder *BlockIndexHolder) Init(segFile base.ISegmentFile)
- func (holder *BlockIndexHolder) LoadIndex(segFile base.ISegmentFile, filename string)
- func (holder *BlockIndexHolder) Max(colIdx int, filter *roaring.Bitmap) (interface{}, error)
- func (holder *BlockIndexHolder) Min(colIdx int, filter *roaring.Bitmap) (interface{}, error)
- func (holder *BlockIndexHolder) NullCount(colIdx int, maxRows uint64, filter *roaring.Bitmap) (uint64, error)
- func (holder *BlockIndexHolder) StringIndicesRefsNoLock() string
- func (holder *BlockIndexHolder) Sum(colIdx int, filter *roaring.Bitmap) (int64, uint64, error)
- type BlockZoneMapIndex
- func (i *BlockZoneMapIndex) Btw(minv interface{}, maxv interface{}) bool
- func (i *BlockZoneMapIndex) Eq(v interface{}) bool
- func (i *BlockZoneMapIndex) Eval(ctx *FilterCtx) error
- func (i *BlockZoneMapIndex) FreeMemory()
- func (i *BlockZoneMapIndex) Ge(v interface{}) bool
- func (i *BlockZoneMapIndex) GetCol() int16
- func (i *BlockZoneMapIndex) GetMemoryCapacity() uint64
- func (i *BlockZoneMapIndex) GetMemorySize() uint64
- func (i *BlockZoneMapIndex) Gt(v interface{}) bool
- func (i *BlockZoneMapIndex) IndexFile() common.IVFile
- func (i *BlockZoneMapIndex) Le(v interface{}) bool
- func (i *BlockZoneMapIndex) Lt(v interface{}) bool
- func (i *BlockZoneMapIndex) Marshal() ([]byte, error)
- func (i *BlockZoneMapIndex) Ne(v interface{}) bool
- func (i *BlockZoneMapIndex) ReadFrom(r io.Reader) (n int64, err error)
- func (i *BlockZoneMapIndex) Reset()
- func (i *BlockZoneMapIndex) Type() base.IndexType
- func (i *BlockZoneMapIndex) Unmarshal(data []byte) error
- func (i *BlockZoneMapIndex) WriteTo(w io.Writer) (n int64, err error)
- type ColumnsAllocator
- type FilterCtx
- type Index
- func BuildBlockZoneMapIndex(data *vector.Vector, t types.Type, colIdx int16, isSorted bool) (Index, error)
- func BuildSegmentZoneMapIndex(data []*vector.Vector, t types.Type, colIdx int16, isSorted bool) (Index, error)
- func MockInt32ZmIndices(cols int) (indices []Index)
- func NewBlockZoneMap(t types.Type, minv, maxv interface{}, colIdx int16) Index
- func NewBlockZoneMapEmptyNode(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) Index
- func NewSegmentZoneMap(t types.Type, minv, maxv interface{}, colIdx int16, blkMin []interface{}, ...) Index
- func NewSegmentZoneMapEmptyNode(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) Index
- type Node
- type NumericBsiIndex
- func (i *NumericBsiIndex) Eval(ctx *FilterCtx) error
- func (i *NumericBsiIndex) FreeMemory()
- func (i *NumericBsiIndex) GetCol() int16
- func (i *NumericBsiIndex) GetMemoryCapacity() uint64
- func (i *NumericBsiIndex) GetMemorySize() uint64
- func (i *NumericBsiIndex) IndexFile() common.IVFile
- func (i *NumericBsiIndex) Marshal() ([]byte, error)
- func (i *NumericBsiIndex) ReadFrom(r io.Reader) (n int64, err error)
- func (i *NumericBsiIndex) Reset()
- func (i *NumericBsiIndex) Type() base.IndexType
- func (i *NumericBsiIndex) Unmarshal(data []byte) error
- func (i *NumericBsiIndex) WriteTo(w io.Writer) (n int64, err error)
- type OpType
- type PostCloseCB
- type RWHelper
- type SegmentIndexHolder
- type SegmentZoneMapIndex
- func (i *SegmentZoneMapIndex) Btw(v interface{}) bool
- func (i *SegmentZoneMapIndex) Eq(v interface{}) bool
- func (i *SegmentZoneMapIndex) Eval(ctx *FilterCtx) error
- func (i *SegmentZoneMapIndex) FreeMemory()
- func (i *SegmentZoneMapIndex) Ge(v interface{}) bool
- func (i *SegmentZoneMapIndex) GetCol() int16
- func (i *SegmentZoneMapIndex) GetMemoryCapacity() uint64
- func (i *SegmentZoneMapIndex) GetMemorySize() uint64
- func (i *SegmentZoneMapIndex) Gt(v interface{}) bool
- func (i *SegmentZoneMapIndex) IndexFile() common.IVFile
- func (i *SegmentZoneMapIndex) Le(v interface{}) bool
- func (i *SegmentZoneMapIndex) Lt(v interface{}) bool
- func (i *SegmentZoneMapIndex) Marshal() ([]byte, error)
- func (i *SegmentZoneMapIndex) Ne(v interface{}) bool
- func (i *SegmentZoneMapIndex) ReadFrom(r io.Reader) (n int64, err error)
- func (i *SegmentZoneMapIndex) Reset()
- func (i *SegmentZoneMapIndex) Type() base.IndexType
- func (i *SegmentZoneMapIndex) Unmarshal(data []byte) error
- func (i *SegmentZoneMapIndex) WriteTo(w io.Writer) (n int64, err error)
- type StandaloneIndicesManager
- type StringBsiIndex
- func (i *StringBsiIndex) Eval(ctx *FilterCtx) error
- func (i *StringBsiIndex) FreeMemory()
- func (i *StringBsiIndex) GetCol() int16
- func (i *StringBsiIndex) GetMemoryCapacity() uint64
- func (i *StringBsiIndex) GetMemorySize() uint64
- func (i *StringBsiIndex) IndexFile() common.IVFile
- func (i *StringBsiIndex) Marshal() ([]byte, error)
- func (i *StringBsiIndex) ReadFrom(r io.Reader) (n int64, err error)
- func (i *StringBsiIndex) Reset()
- func (i *StringBsiIndex) Type() base.IndexType
- func (i *StringBsiIndex) Unmarshal(data []byte) error
- func (i *StringBsiIndex) WriteTo(w io.Writer) (n int64, err error)
- type TableHolder
- func (holder *TableHolder) DropSegment(id uint64) SegmentIndexHolder
- func (holder *TableHolder) GetSegmentCount() int64
- func (holder *TableHolder) RegisterSegment(id common.ID, segType base.SegmentType, cb PostCloseCB) SegmentIndexHolder
- func (holder *TableHolder) String() string
- func (holder *TableHolder) StringIndicesRefs() string
- func (holder *TableHolder) StrongRefSegment(id uint64) (seg SegmentIndexHolder)
- func (holder *TableHolder) UpgradeSegment(id uint64, segType base.SegmentType) SegmentIndexHolder
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultRWHelper = new(RWHelper)
)
Functions ¶
func BlockZoneMapIndexConstructor ¶
func BlockZoneMapIndexConstructor(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
func BuildBitSlicedIndex ¶
func NewNumericBsiEmptyNode ¶
func NewNumericBsiEmptyNode(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
func NewStringBsiEmptyNode ¶
func NewStringBsiEmptyNode(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
func NumericBsiIndexConstructor ¶
func NumericBsiIndexConstructor(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
func SegmentZoneMapIndexConstructor ¶
func SegmentZoneMapIndexConstructor(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
func StringBsiIndexConstructor ¶
func StringBsiIndexConstructor(vf common.IVFile, useCompress bool, freeFunc buf.MemoryFreeFunc) buf.IMemoryNode
Types ¶
type BlockHoldersManager ¶
type BlockHoldersManager interface {
StrongRefBlock(uint64) *BlockIndexHolder
RegisterBlock(common.ID, base.BlockType, PostCloseCB) *BlockIndexHolder
DropBlock(uint64) *BlockIndexHolder
GetBlockCount() int32
// contains filtered or unexported methods
}
type BlockIndexHolder ¶
type BlockIndexHolder struct {
common.RefHelper
ID common.ID
BufMgr mgrif.IBufferManager
Inited bool
PostCloseCB PostCloseCB
// contains filtered or unexported fields
}
func (*BlockIndexHolder) AllocateVersion ¶
func (holder *BlockIndexHolder) AllocateVersion(colIdx int) uint64
func (*BlockIndexHolder) DropIndex ¶
func (holder *BlockIndexHolder) DropIndex(filename string)
func (*BlockIndexHolder) EvalFilter ¶
func (holder *BlockIndexHolder) EvalFilter(colIdx int, ctx *FilterCtx) error
func (*BlockIndexHolder) IndicesCount ¶
func (holder *BlockIndexHolder) IndicesCount() int
func (*BlockIndexHolder) Init ¶
func (holder *BlockIndexHolder) Init(segFile base.ISegmentFile)
func (*BlockIndexHolder) LoadIndex ¶
func (holder *BlockIndexHolder) LoadIndex(segFile base.ISegmentFile, filename string)
func (*BlockIndexHolder) Max ¶
func (holder *BlockIndexHolder) Max(colIdx int, filter *roaring.Bitmap) (interface{}, error)
func (*BlockIndexHolder) Min ¶
func (holder *BlockIndexHolder) Min(colIdx int, filter *roaring.Bitmap) (interface{}, error)
func (*BlockIndexHolder) StringIndicesRefsNoLock ¶
func (holder *BlockIndexHolder) StringIndicesRefsNoLock() string
type BlockZoneMapIndex ¶
type BlockZoneMapIndex struct {
T types.Type
MinV interface{}
MaxV interface{}
Col int16
FreeFunc buf.MemoryFreeFunc
File common.IVFile
UseCompress bool
}
func (*BlockZoneMapIndex) Btw ¶
func (i *BlockZoneMapIndex) Btw(minv interface{}, maxv interface{}) bool
func (*BlockZoneMapIndex) Eq ¶
func (i *BlockZoneMapIndex) Eq(v interface{}) bool
func (*BlockZoneMapIndex) Eval ¶
func (i *BlockZoneMapIndex) Eval(ctx *FilterCtx) error
func (*BlockZoneMapIndex) FreeMemory ¶
func (i *BlockZoneMapIndex) FreeMemory()
func (*BlockZoneMapIndex) Ge ¶
func (i *BlockZoneMapIndex) Ge(v interface{}) bool
func (*BlockZoneMapIndex) GetCol ¶
func (i *BlockZoneMapIndex) GetCol() int16
func (*BlockZoneMapIndex) GetMemoryCapacity ¶
func (i *BlockZoneMapIndex) GetMemoryCapacity() uint64
func (*BlockZoneMapIndex) GetMemorySize ¶
func (i *BlockZoneMapIndex) GetMemorySize() uint64
func (*BlockZoneMapIndex) Gt ¶
func (i *BlockZoneMapIndex) Gt(v interface{}) bool
func (*BlockZoneMapIndex) IndexFile ¶
func (i *BlockZoneMapIndex) IndexFile() common.IVFile
func (*BlockZoneMapIndex) Le ¶
func (i *BlockZoneMapIndex) Le(v interface{}) bool
func (*BlockZoneMapIndex) Lt ¶
func (i *BlockZoneMapIndex) Lt(v interface{}) bool
func (*BlockZoneMapIndex) Marshal ¶
func (i *BlockZoneMapIndex) Marshal() ([]byte, error)
func (*BlockZoneMapIndex) Ne ¶
func (i *BlockZoneMapIndex) Ne(v interface{}) bool
func (*BlockZoneMapIndex) ReadFrom ¶
func (i *BlockZoneMapIndex) ReadFrom(r io.Reader) (n int64, err error)
func (*BlockZoneMapIndex) Reset ¶
func (i *BlockZoneMapIndex) Reset()
func (*BlockZoneMapIndex) Type ¶
func (i *BlockZoneMapIndex) Type() base.IndexType
func (*BlockZoneMapIndex) Unmarshal ¶
func (i *BlockZoneMapIndex) Unmarshal(data []byte) error
type ColumnsAllocator ¶
type ColumnsAllocator struct {
sync.RWMutex
Allocators map[int]*common.IDAlloctor
}
type FilterCtx ¶
type FilterCtx struct {
Op OpType
Val interface{}
// Used for IN | NOT IN
ValSet map[interface{}]bool
ValMin interface{}
ValMax interface{}
BoolRes bool
BMRes *roaring.Bitmap
Err error
BsiRequired bool
BlockSet []uint64
}
func NewFilterCtx ¶
type Index ¶
type Index interface {
buf.IMemoryNode
Type() base.IndexType
GetCol() int16
Eval(ctx *FilterCtx) error
IndexFile() common.IVFile
}
func BuildBlockZoneMapIndex ¶
func MockInt32ZmIndices ¶
func NewBlockZoneMap ¶
func NewSegmentZoneMap ¶
type NumericBsiIndex ¶
type NumericBsiIndex struct {
bsi.NumericBSI
T types.Type
Col int16
File common.IVFile
UseCompress bool
FreeFunc buf.MemoryFreeFunc
}
func NewNumericBsiIndex ¶
func NewNumericBsiIndex(t types.Type, bitSize int, colIdx int16) *NumericBsiIndex
func (*NumericBsiIndex) Eval ¶
func (i *NumericBsiIndex) Eval(ctx *FilterCtx) error
func (*NumericBsiIndex) FreeMemory ¶
func (i *NumericBsiIndex) FreeMemory()
func (*NumericBsiIndex) GetCol ¶
func (i *NumericBsiIndex) GetCol() int16
func (*NumericBsiIndex) GetMemoryCapacity ¶
func (i *NumericBsiIndex) GetMemoryCapacity() uint64
func (*NumericBsiIndex) GetMemorySize ¶
func (i *NumericBsiIndex) GetMemorySize() uint64
func (*NumericBsiIndex) IndexFile ¶
func (i *NumericBsiIndex) IndexFile() common.IVFile
func (*NumericBsiIndex) Marshal ¶
func (i *NumericBsiIndex) Marshal() ([]byte, error)
func (*NumericBsiIndex) ReadFrom ¶
func (i *NumericBsiIndex) ReadFrom(r io.Reader) (n int64, err error)
func (*NumericBsiIndex) Reset ¶
func (i *NumericBsiIndex) Reset()
func (*NumericBsiIndex) Type ¶
func (i *NumericBsiIndex) Type() base.IndexType
func (*NumericBsiIndex) Unmarshal ¶
func (i *NumericBsiIndex) Unmarshal(data []byte) error
type PostCloseCB ¶
type PostCloseCB = func(interface{})
type RWHelper ¶
type RWHelper struct{}
func (*RWHelper) FlushBitSlicedIndex ¶
func (*RWHelper) ReadIndices ¶
func (*RWHelper) ReadIndicesMeta ¶
type SegmentIndexHolder ¶
type SegmentIndexHolder interface {
common.IRef
BlockHoldersManager
StandaloneIndicesManager
Init(base.ISegmentFile)
EvalFilter(int, *FilterCtx) error
CollectMinMax(int) ([]interface{}, []interface{}, error)
Count(int, *roaring64.Bitmap) (uint64, error)
NullCount(int, uint64, *roaring64.Bitmap) (uint64, error)
Min(int, *roaring64.Bitmap) (interface{}, error)
Max(int, *roaring64.Bitmap) (interface{}, error)
Sum(int, *roaring64.Bitmap) (int64, uint64, error)
HolderType() base.SegmentType
GetID() common.ID
GetCB() PostCloseCB
// contains filtered or unexported methods
}
type SegmentZoneMapIndex ¶
type SegmentZoneMapIndex struct {
T types.Type
MinV interface{}
MaxV interface{}
Col int16
FreeFunc buf.MemoryFreeFunc
File common.IVFile
UseCompress bool
BlkMin []interface{}
BlkMax []interface{}
}
func (*SegmentZoneMapIndex) Btw ¶
func (i *SegmentZoneMapIndex) Btw(v interface{}) bool
func (*SegmentZoneMapIndex) Eq ¶
func (i *SegmentZoneMapIndex) Eq(v interface{}) bool
func (*SegmentZoneMapIndex) Eval ¶
func (i *SegmentZoneMapIndex) Eval(ctx *FilterCtx) error
func (*SegmentZoneMapIndex) FreeMemory ¶
func (i *SegmentZoneMapIndex) FreeMemory()
func (*SegmentZoneMapIndex) Ge ¶
func (i *SegmentZoneMapIndex) Ge(v interface{}) bool
func (*SegmentZoneMapIndex) GetCol ¶
func (i *SegmentZoneMapIndex) GetCol() int16
func (*SegmentZoneMapIndex) GetMemoryCapacity ¶
func (i *SegmentZoneMapIndex) GetMemoryCapacity() uint64
func (*SegmentZoneMapIndex) GetMemorySize ¶
func (i *SegmentZoneMapIndex) GetMemorySize() uint64
func (*SegmentZoneMapIndex) Gt ¶
func (i *SegmentZoneMapIndex) Gt(v interface{}) bool
func (*SegmentZoneMapIndex) IndexFile ¶
func (i *SegmentZoneMapIndex) IndexFile() common.IVFile
func (*SegmentZoneMapIndex) Le ¶
func (i *SegmentZoneMapIndex) Le(v interface{}) bool
func (*SegmentZoneMapIndex) Lt ¶
func (i *SegmentZoneMapIndex) Lt(v interface{}) bool
func (*SegmentZoneMapIndex) Marshal ¶
func (i *SegmentZoneMapIndex) Marshal() ([]byte, error)
func (*SegmentZoneMapIndex) Ne ¶
func (i *SegmentZoneMapIndex) Ne(v interface{}) bool
func (*SegmentZoneMapIndex) ReadFrom ¶
func (i *SegmentZoneMapIndex) ReadFrom(r io.Reader) (n int64, err error)
func (*SegmentZoneMapIndex) Reset ¶
func (i *SegmentZoneMapIndex) Reset()
func (*SegmentZoneMapIndex) Type ¶
func (i *SegmentZoneMapIndex) Type() base.IndexType
func (*SegmentZoneMapIndex) Unmarshal ¶
func (i *SegmentZoneMapIndex) Unmarshal(data []byte) error
type StringBsiIndex ¶
type StringBsiIndex struct {
bsi.StringBSI
T types.Type
Col int16
File common.IVFile
UseCompress bool
FreeFunc buf.MemoryFreeFunc
}
func NewStringBsiIndex ¶
func NewStringBsiIndex(t types.Type, colIdx int16) *StringBsiIndex
func (*StringBsiIndex) Eval ¶
func (i *StringBsiIndex) Eval(ctx *FilterCtx) error
func (*StringBsiIndex) FreeMemory ¶
func (i *StringBsiIndex) FreeMemory()
func (*StringBsiIndex) GetCol ¶
func (i *StringBsiIndex) GetCol() int16
func (*StringBsiIndex) GetMemoryCapacity ¶
func (i *StringBsiIndex) GetMemoryCapacity() uint64
func (*StringBsiIndex) GetMemorySize ¶
func (i *StringBsiIndex) GetMemorySize() uint64
func (*StringBsiIndex) IndexFile ¶
func (i *StringBsiIndex) IndexFile() common.IVFile
func (*StringBsiIndex) Marshal ¶
func (i *StringBsiIndex) Marshal() ([]byte, error)
func (*StringBsiIndex) ReadFrom ¶
func (i *StringBsiIndex) ReadFrom(r io.Reader) (n int64, err error)
func (*StringBsiIndex) Reset ¶
func (i *StringBsiIndex) Reset()
func (*StringBsiIndex) Type ¶
func (i *StringBsiIndex) Type() base.IndexType
func (*StringBsiIndex) Unmarshal ¶
func (i *StringBsiIndex) Unmarshal(data []byte) error
type TableHolder ¶
type TableHolder struct {
common.RefHelper
ID uint64
BufMgr mgrif.IBufferManager
// contains filtered or unexported fields
}
func NewTableHolder ¶
func NewTableHolder(bufMgr mgrif.IBufferManager, id uint64) *TableHolder
func (*TableHolder) DropSegment ¶
func (holder *TableHolder) DropSegment(id uint64) SegmentIndexHolder
func (*TableHolder) GetSegmentCount ¶
func (holder *TableHolder) GetSegmentCount() int64
func (*TableHolder) RegisterSegment ¶
func (holder *TableHolder) RegisterSegment(id common.ID, segType base.SegmentType, cb PostCloseCB) SegmentIndexHolder
func (*TableHolder) String ¶
func (holder *TableHolder) String() string
func (*TableHolder) StringIndicesRefs ¶
func (holder *TableHolder) StringIndicesRefs() string
func (*TableHolder) StrongRefSegment ¶
func (holder *TableHolder) StrongRefSegment(id uint64) (seg SegmentIndexHolder)
func (*TableHolder) UpgradeSegment ¶
func (holder *TableHolder) UpgradeSegment(id uint64, segType base.SegmentType) SegmentIndexHolder
Click to show internal directories.
Click to hide internal directories.