colstore

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PKMetaPrefixSize = util.Uint64SizeBytes*2 + util.Uint32SizeBytes*2
	CRCLen           = 4
)
View Source
const (
	CoarseIndexFragment        int    = 8
	MinRowsForSeek             int    = 0
	IndexFileSuffix            string = ".idx"
	MinMaxIndexFileSuffix      string = ".mm"
	SetIndexFileSuffix         string = ".set"
	BloomFilterIndexFileSuffix string = ".bf"
	TextIndexDataFileSuffix    string = ".pos" // posting list
	TextIndexHeadFileSuffix    string = ".bh"  // block header
	TextIndexPartFileSuffix    string = ".ph"  // part header
	DefaultTCLocation          int8   = -1
)
View Source
const (
	TextIndexData = iota
	TextIndexHead
	TextIndexPart
	TextIndexMax
)

Variables

This section is empty.

Functions

func AppendPKIndexSuffix added in v1.2.0

func AppendPKIndexSuffix(dataPath string) string

func AppendSecondaryIndexSuffix added in v1.3.0

func AppendSecondaryIndexSuffix(dataPath string, fieldName string, indexType index.IndexType, fileType int) string

func InitDecFunctions

func InitDecFunctions()

func MarshalPkMetaBlock added in v1.3.0

func MarshalPkMetaBlock(startId, endId uint64, offset, size uint32, meta, colsOffset []byte) []byte

Types

type ChunkBuilder

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

func NewChunkBuilder

func NewChunkBuilder() *ChunkBuilder

func (*ChunkBuilder) EncodeChunk

func (b *ChunkBuilder) EncodeChunk(rec *record.Record, dst []byte, offset []byte, offsetStart uint32) ([]byte, error)

type ColumnBuilder

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

func NewColumnBuilder

func NewColumnBuilder() *ColumnBuilder

func (*ColumnBuilder) EncodeColumn

func (b *ColumnBuilder) EncodeColumn(ref *record.Field, col *record.ColVal) ([]byte, error)

type DetachedPKData added in v1.2.0

type DetachedPKData struct {
	Offset int64 // temporary variable, used for sorting
	Data   *record.Record
}

func (*DetachedPKData) Unmarshal added in v1.2.0

func (m *DetachedPKData) Unmarshal(src []byte, meta *DetachedPKMeta, info *DetachedPKMetaInfo) ([]byte, error)

type DetachedPKInfo added in v1.2.0

type DetachedPKInfo struct {
	StartBlockId uint64
	EndBlockId   uint64
	TcLocation   int8
	Data         *record.Record
}

func GetPKInfoByPKMetaData added in v1.2.0

func GetPKInfoByPKMetaData(meta *DetachedPKMeta, data *DetachedPKData, tcLocation int8) *DetachedPKInfo

func (*DetachedPKInfo) GetEndBlockId added in v1.3.0

func (d *DetachedPKInfo) GetEndBlockId() uint64

func (*DetachedPKInfo) GetStartBlockId added in v1.3.0

func (d *DetachedPKInfo) GetStartBlockId() uint64

func (*DetachedPKInfo) IsBlockExist added in v1.3.0

func (d *DetachedPKInfo) IsBlockExist(start, end uint64) bool

type DetachedPKMeta added in v1.2.0

type DetachedPKMeta struct {
	StartBlockId uint64
	EndBlockId   uint64
	Offset       uint32
	Length       uint32
	ColOffset    []byte
}

func (*DetachedPKMeta) Size added in v1.2.0

func (m *DetachedPKMeta) Size() int

func (*DetachedPKMeta) Unmarshal added in v1.2.0

func (m *DetachedPKMeta) Unmarshal(src []byte) ([]byte, error)

type DetachedPKMetaInfo added in v1.2.0

type DetachedPKMetaInfo struct {
	Schema     record.Schemas
	TCLocation int8
	Offset     int64
}

func (*DetachedPKMetaInfo) Size added in v1.2.0

func (m *DetachedPKMetaInfo) Size() int

func (*DetachedPKMetaInfo) Unmarshal added in v1.2.0

func (m *DetachedPKMetaInfo) Unmarshal(src []byte) ([]byte, error)

func (*DetachedPKMetaInfo) UnmarshalPublicSize added in v1.2.0

func (m *DetachedPKMetaInfo) UnmarshalPublicSize(src []byte) ([]byte, error)

type IndexBuilder

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

func NewIndexBuilder

func NewIndexBuilder(lockPath *string, filePath string) *IndexBuilder

func NewIndexBuilderByFd added in v1.2.0

func NewIndexBuilderByFd(lockPath *string, fd fileops.File, firstFlush bool) *IndexBuilder

func (*IndexBuilder) GetEncodeChunkSize added in v1.2.0

func (b *IndexBuilder) GetEncodeChunkSize() uint32

func (*IndexBuilder) Reset

func (b *IndexBuilder) Reset()

func (*IndexBuilder) WriteData

func (b *IndexBuilder) WriteData(rec *record.Record, tcLocation int8) error

func (*IndexBuilder) WriteDetachedData added in v1.2.0

func (b *IndexBuilder) WriteDetachedData(rec *record.Record, tcLocation int8) error

func (*IndexBuilder) WriteDetachedMeta added in v1.2.0

func (b *IndexBuilder) WriteDetachedMeta(startId, endId uint64, offset, size uint32, fd fileops.File) error

type IndexWriter added in v1.3.0

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

func NewIndexWriter added in v1.3.0

func NewIndexWriter(lockPath *string, filePath string) (*IndexWriter, error)

func (*IndexWriter) Reset added in v1.3.0

func (b *IndexWriter) Reset()

func (*IndexWriter) WriteData added in v1.3.0

func (b *IndexWriter) WriteData(data []byte) error

type PKFiles

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

func NewPKFiles

func NewPKFiles() *PKFiles

func (*PKFiles) DelPKInfo

func (f *PKFiles) DelPKInfo(file string)

func (*PKFiles) GetPKInfo

func (f *PKFiles) GetPKInfo(file string) (*PKInfo, bool)

func (*PKFiles) GetPKInfos

func (f *PKFiles) GetPKInfos() PKInfos

func (*PKFiles) SetPKInfo

func (f *PKFiles) SetPKInfo(file string, rec *record.Record, mark fragment.IndexFragment, tcLocation int8)

type PKInfo

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

func (*PKInfo) GetMark

func (p *PKInfo) GetMark() fragment.IndexFragment

func (*PKInfo) GetRec

func (p *PKInfo) GetRec() *record.Record

func (*PKInfo) GetTCLocation added in v1.1.1

func (p *PKInfo) GetTCLocation() int8

type PKInfos

type PKInfos map[string]*PKInfo

type PkMetaBlock added in v1.3.0

type PkMetaBlock struct {
	StartBlockId uint64
	EndBlockId   uint64
	Offset       uint32
	Size         uint32
}

func UnmarshalPkMetaBlock added in v1.3.0

func UnmarshalPkMetaBlock(src []byte) (*PkMetaBlock, error)

type PrimaryKeyReader

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

func NewPrimaryKeyReader

func NewPrimaryKeyReader(name string, lockPath *string) (*PrimaryKeyReader, error)

func (*PrimaryKeyReader) Close

func (r *PrimaryKeyReader) Close() error

func (*PrimaryKeyReader) FileSize

func (r *PrimaryKeyReader) FileSize() int64

func (*PrimaryKeyReader) Open

func (r *PrimaryKeyReader) Open() error

func (*PrimaryKeyReader) Read

func (r *PrimaryKeyReader) Read(offset int64, size uint32, dst *[]byte) ([]byte, error)

func (*PrimaryKeyReader) ReadData

func (r *PrimaryKeyReader) ReadData() (*record.Record, int8, error)

func (*PrimaryKeyReader) Version

func (r *PrimaryKeyReader) Version() uint32

type SkipIndexBuilder added in v1.2.0

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

func NewSkipIndexBuilder added in v1.2.0

func NewSkipIndexBuilder(lockPath *string, filePath string) *SkipIndexBuilder

func (*SkipIndexBuilder) Reset added in v1.2.0

func (b *SkipIndexBuilder) Reset()

func (*SkipIndexBuilder) WriteData added in v1.2.0

func (b *SkipIndexBuilder) WriteData(data []byte) error

Jump to

Keyboard shortcuts

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