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) 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.