Documentation ¶
Overview ¶
Package heap provides heap operations for any type that implements heap.Interface. A heap is a tree with the property that each node is the minimum-valued node in its subtree.
The minimum element in the tree is the root, at index 0.
A heap is a common way to implement a priority queue. To build a priority queue, implement the Heap interface with the (negative) priority as the ordering for the Less method, so Push adds items while Pop removes the highest-priority item from the queue. The Examples include such an implementation; the file example_pq_test.go has the complete source.
Index ¶
- Variables
- func AddSortPhaseMapping(b *api.BlkTransferBooking, idx int, originRowCnt int, mapping []int64)
- func CleanTransMapping(b *api.BlkTransferBooking)
- func DoMergeAndWrite(ctx context.Context, txnInfo string, sortkeyPos int, mergehost MergeTaskHost) (err error)
- func GetNewWriter(fs fileservice.FileService, ver uint32, seqnums []uint16, sortkeyPos int, ...) *blockio.BlockWriter
- func MergeAObj(ctx context.Context, vpool DisposableVecPool, batches []*containers.Batch, ...) ([]*batch.Batch, func(), []int, error)
- func NewBlkTransferBooking(size int) *api.BlkTransferBooking
- func ReshapeBatches(batches []*containers.Batch, toLayout []uint32, vpool DisposableVecPool) ([]*batch.Batch, func(), []int, error)
- func SortBlockColumns(cols []containers.Vector, pk int, pool *containers.VectorPool) ([]int64, error)
- func UpdateMappingAfterMerge(b *api.BlkTransferBooking, mapping []int, toLayout []uint32)
- type AObjMerger
- type DisposableVecPool
- type MergeTaskHost
- type Merger
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMoreBlocks = moerr.NewInternalErrorNoCtx("no more blocks")
Functions ¶
func AddSortPhaseMapping ¶ added in v1.2.0
func AddSortPhaseMapping(b *api.BlkTransferBooking, idx int, originRowCnt int, mapping []int64)
func CleanTransMapping ¶ added in v1.2.0
func CleanTransMapping(b *api.BlkTransferBooking)
func DoMergeAndWrite ¶ added in v1.2.0
func GetNewWriter ¶ added in v1.2.0
func GetNewWriter( fs fileservice.FileService, ver uint32, seqnums []uint16, sortkeyPos int, sortkeyIsPK bool, ) *blockio.BlockWriter
func NewBlkTransferBooking ¶ added in v1.2.0
func NewBlkTransferBooking(size int) *api.BlkTransferBooking
func ReshapeBatches ¶ added in v1.2.0
func ReshapeBatches(batches []*containers.Batch, toLayout []uint32, vpool DisposableVecPool) ([]*batch.Batch, func(), []int, error)
func SortBlockColumns ¶
func SortBlockColumns( cols []containers.Vector, pk int, pool *containers.VectorPool, ) ([]int64, error)
func UpdateMappingAfterMerge ¶ added in v1.2.0
func UpdateMappingAfterMerge(b *api.BlkTransferBooking, mapping []int, toLayout []uint32)
Types ¶
type AObjMerger ¶ added in v1.2.0
type DisposableVecPool ¶ added in v1.2.0
type DisposableVecPool interface { GetVector(*types.Type) (ret *vector.Vector, release func()) GetMPool() *mpool.MPool }
DisposableVecPool bridge the gap between the vector pools in cn and tn
type MergeTaskHost ¶ added in v1.2.0
type MergeTaskHost interface { DisposableVecPool Name() string HostHintName() string GetCommitEntry() *api.MergeCommitEntry InitTransferMaps(blkCnt int) GetTransferMaps() *api.TransferMaps PrepareNewWriter() *blockio.BlockWriter DoTransfer() bool GetObjectCnt() int GetBlkCnts() []int GetAccBlkCnts() []int GetSortKeyType() types.Type LoadNextBatch(ctx context.Context, objIdx uint32) (*batch.Batch, *nulls.Nulls, func(), error) GetTotalSize() uint64 // total size of all objects, definitely there are cases where the size exceeds 4G, so use uint64 GetTotalRowCnt() uint32 GetBlockMaxRows() uint32 GetObjectMaxBlocks() uint16 GetTargetObjSize() uint32 }
Click to show internal directories.
Click to hide internal directories.