mergeutil

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeSortBatches

func MergeSortBatches(
	batches []*batch.Batch,
	sortKeyIdx int,
	buffer *batch.Batch,
	sinker SinkerT,
	mp *mpool.MPool,
	putBack func(int),
) (*batch.Batch, error)

func SortColumnsByIndex

func SortColumnsByIndex(
	cols []*vector.Vector, sortIdx int, mp *mpool.MPool,
) (err error)

func SortColumnsByIndexWithBuf

func SortColumnsByIndexWithBuf(
	cols []*vector.Vector, sortIdx int, mp *mpool.MPool, idxBuf *[]int64, shuffleBuf *[]byte,
) (err error)

SortColumnsByIndexWithBuf sorts all columns by the sort key column at sortIdx. idxBuf is a scratch buffer for the permutation index array; shuffleBuf is a scratch buffer for the shuffle operation. Both are grown as needed and retained across calls for reuse.

Types

type SinkerT

type SinkerT func(*batch.Batch) (*batch.Batch, error)

SinkerT takes ownership of the full buffer and returns a clean, empty replacement batch (with capacity retained) for MergeSortBatches to fill.

Jump to

Keyboard shortcuts

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