hashbuild

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: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildHashMap = iota
	HandleRuntimeFilter
	SendJoinMap
	SendSucceed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HashBuild

type HashBuild struct {
	NeedHashMap       bool
	HashOnPK          bool
	NeedBatches       bool
	NeedAllocateSels  bool
	IsShuffle         bool
	CanSpill          bool
	Conditions        []*plan.Expr
	JoinMapTag        int32
	JoinMapRefCnt     int32
	ShuffleIdx        int32
	RuntimeFilterSpec *plan.RuntimeFilterSpec
	SpillThreshold    int64

	IsDedup                   bool
	DedupBuildKeepLast        bool
	DelColIdx                 int32
	OnDuplicateAction         plan.Node_OnDuplicateAction
	DedupColName              string
	DedupColTypes             []plan.Type
	DedupDeleteMarkerColIdx   int32
	DedupDeleteKeepColIdxList []int32

	vm.OperatorBase
	// contains filtered or unexported fields
}

func NewArgument added in v1.2.0

func NewArgument() *HashBuild

func (*HashBuild) Call

func (hashBuild *HashBuild) Call(proc *process.Process) (vm.CallResult, error)

func (*HashBuild) ExecProjection

func (hashBuild *HashBuild) ExecProjection(proc *process.Process, input *batch.Batch) (*batch.Batch, error)

func (*HashBuild) Free

func (hashBuild *HashBuild) Free(proc *process.Process, pipelineFailed bool, err error)

func (*HashBuild) GetOperatorBase

func (hashBuild *HashBuild) GetOperatorBase() *vm.OperatorBase

func (*HashBuild) OpType

func (hashBuild *HashBuild) OpType() vm.OpType

func (*HashBuild) Prepare

func (hashBuild *HashBuild) Prepare(proc *process.Process) (err error)

func (*HashBuild) Release

func (hashBuild *HashBuild) Release()

func (*HashBuild) Reset

func (hashBuild *HashBuild) Reset(proc *process.Process, pipelineFailed bool, err error)

func (*HashBuild) String

func (hashBuild *HashBuild) String(buf *bytes.Buffer)

func (HashBuild) TypeName

func (hashBuild HashBuild) TypeName() string

type HashmapBuilder

type HashmapBuilder struct {
	InputBatchRowCount int

	IntHashMap *hashmap.IntHashMap
	StrHashMap *hashmap.StrHashMap
	Sels       message.GroupSels

	Batches colexec.Batches

	UniqueJoinKeys []*vector.Vector

	IsDedup            bool
	DedupBuildKeepLast bool
	OnDuplicateAction  plan.Node_OnDuplicateAction
	DedupColName       string
	DedupColTypes      []plan.Type

	IgnoreRows *bitmap.Bitmap

	DelRows *bitmap.Bitmap
	// contains filtered or unexported fields
}

func (*HashmapBuilder) BuildHashmap

func (hb *HashmapBuilder) BuildHashmap(hashOnPK bool, needAllocateSels bool, needUniqueVec bool, proc *process.Process) (retErr error)

func (*HashmapBuilder) ExtractCachedIteratorsForReuse

func (hb *HashmapBuilder) ExtractCachedIteratorsForReuse() (hashmap.Iterator, hashmap.Iterator)

ExtractCachedIteratorsForReuse detaches and returns cached iterators so they can be preserved across object pool resets without retaining old hashmaps. After extraction the builder no longer holds references to the iterators.

func (*HashmapBuilder) Free

func (hb *HashmapBuilder) Free(proc *process.Process)

func (*HashmapBuilder) FreeExecutors

func (hb *HashmapBuilder) FreeExecutors()

func (*HashmapBuilder) FreeHashMapAndBatches

func (hb *HashmapBuilder) FreeHashMapAndBatches(proc *process.Process)

func (*HashmapBuilder) GetGroupCount

func (hb *HashmapBuilder) GetGroupCount() uint64

func (*HashmapBuilder) GetJoinMap

func (hb *HashmapBuilder) GetJoinMap(mp *mpool.MPool) *message.JoinMap

func (*HashmapBuilder) GetSize

func (hb *HashmapBuilder) GetSize() int64

func (*HashmapBuilder) Prepare

func (hb *HashmapBuilder) Prepare(
	keyCols []*plan.Expr,
	delColIdx int32,
	dedupDeleteMarkerColIdx int32,
	dedupDeleteKeepColIdxList []int32,
	proc *process.Process,
) error

func (*HashmapBuilder) Reset

func (hb *HashmapBuilder) Reset(proc *process.Process, hashTableHasNotSent bool)

func (*HashmapBuilder) RestoreCachedIterators

func (hb *HashmapBuilder) RestoreCachedIterators(intItr, strItr hashmap.Iterator)

RestoreCachedIterators reattaches cached iterators (if any) after a pool reset so they can be reused by future builds.

Jump to

Keyboard shortcuts

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