vecgroupchecker

package
v1.1.0-beta.0...-68d6b99 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VecGroupChecker

type VecGroupChecker struct {
	GroupByItems []expression.Expression
	// contains filtered or unexported fields
}

VecGroupChecker is used to split a given chunk according to the `group by` expression in a vectorized manner It is usually used for streamAgg

func NewVecGroupChecker

func NewVecGroupChecker(ctx expression.EvalContext, vecEnabled bool, items []expression.Expression) *VecGroupChecker

NewVecGroupChecker creates a new VecGroupChecker

func (*VecGroupChecker) GetNextGroup

func (e *VecGroupChecker) GetNextGroup() (begin, end int)

GetNextGroup returns the begin and end position of the next group.

func (*VecGroupChecker) GroupCount

func (e *VecGroupChecker) GroupCount() int

GroupCount returns the number of groups.

func (*VecGroupChecker) IsExhausted

func (e *VecGroupChecker) IsExhausted() bool

IsExhausted returns true if there is no more group to check.

func (*VecGroupChecker) Reset

func (e *VecGroupChecker) Reset()

Reset resets the group checker.

func (*VecGroupChecker) SplitIntoGroups

func (e *VecGroupChecker) SplitIntoGroups(chk *chunk.Chunk) (isFirstGroupSameAsPrev bool, err error)

SplitIntoGroups splits a chunk into multiple groups which the row in the same group have the same groupKey `isFirstGroupSameAsPrev` indicates whether the groupKey of the first group of the newly passed chunk is equal to the groupKey of the last group left before TODO: Since all the group by items are only a column reference, guaranteed by building projection below aggregation, we can directly compare data in a chunk.

Jump to

Keyboard shortcuts

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