fragment

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FragmentRange

type FragmentRange struct {
	Start uint32
	End   uint32
}

FragmentRange means a fragment range of a data file. The range is left closed and right open. Such as [Start, end). A fragment is a logical data block based of row. It is used for data block filtering of primary index and skip index. Currently, fragment and segment are one-to-one and can be expanded to one-to-N in the future.

func NewFragmentRange

func NewFragmentRange(start, end uint32) *FragmentRange

func (*FragmentRange) Equal

func (fr *FragmentRange) Equal(other *FragmentRange) bool

Equal is used to determine that two fragment ranges are the same.

func (*FragmentRange) Less

func (fr *FragmentRange) Less(other *FragmentRange) (bool, error)

Less is used to determine that the former fragment range is on the left of the latter. The horizontal axis starts from 0.

type FragmentRanges

type FragmentRanges []*FragmentRange

func (FragmentRanges) Empty added in v1.2.0

func (frs FragmentRanges) Empty() bool

func (FragmentRanges) GetLastFragment

func (frs FragmentRanges) GetLastFragment() uint32

func (FragmentRanges) String

func (frs FragmentRanges) String() string

type IndexFragment

type IndexFragment interface {
	GetFragmentCount() uint32
	GetRowsCountInRange(start int, end int) uint64
	GetTotalRowsCount() uint64
	PopFragment()
	Empty() bool
}

func NewIndexFragmentFixedSize

func NewIndexFragmentFixedSize(fragmentCount uint32, rowCountPerFragment uint64) IndexFragment

func NewIndexFragmentVariable

func NewIndexFragmentVariable(accumulateRowCount []uint64) IndexFragment

type IndexFragmentFixedSizeImpl

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

IndexFragmentFixedSizeImpl indicates that the size of fragment is fixed and the last row of data is added to the index by default.

func (*IndexFragmentFixedSizeImpl) Empty

func (f *IndexFragmentFixedSizeImpl) Empty() bool

func (*IndexFragmentFixedSizeImpl) GetFragmentCount

func (f *IndexFragmentFixedSizeImpl) GetFragmentCount() uint32

func (*IndexFragmentFixedSizeImpl) GetRowsCountInRange

func (f *IndexFragmentFixedSizeImpl) GetRowsCountInRange(start int, end int) uint64

func (*IndexFragmentFixedSizeImpl) GetTotalRowsCount

func (f *IndexFragmentFixedSizeImpl) GetTotalRowsCount() uint64

func (*IndexFragmentFixedSizeImpl) PopFragment

func (f *IndexFragmentFixedSizeImpl) PopFragment()

type IndexFragmentVariableImpl

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

IndexFragmentVariableImpl indicates that the size of fragment is variable and the last row of data is added to the index by default.

func (*IndexFragmentVariableImpl) AddRowsToLastFragment

func (f *IndexFragmentVariableImpl) AddRowsToLastFragment(rowsCount uint64)

func (*IndexFragmentVariableImpl) AppendFragment

func (f *IndexFragmentVariableImpl) AppendFragment(rowsCount uint64)

func (*IndexFragmentVariableImpl) Empty

func (f *IndexFragmentVariableImpl) Empty() bool

func (*IndexFragmentVariableImpl) GetFragmentCount

func (f *IndexFragmentVariableImpl) GetFragmentCount() uint32

func (*IndexFragmentVariableImpl) GetFragmentStartingRow

func (f *IndexFragmentVariableImpl) GetFragmentStartingRow(markIndex int) uint64

func (*IndexFragmentVariableImpl) GetLastFragmentRows

func (f *IndexFragmentVariableImpl) GetLastFragmentRows() uint64

func (*IndexFragmentVariableImpl) GetRowsCountInRange

func (f *IndexFragmentVariableImpl) GetRowsCountInRange(start int, end int) uint64

func (*IndexFragmentVariableImpl) GetTotalRowsCount

func (f *IndexFragmentVariableImpl) GetTotalRowsCount() uint64

func (*IndexFragmentVariableImpl) PopFragment

func (f *IndexFragmentVariableImpl) PopFragment()

Jump to

Keyboard shortcuts

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