Documentation
¶
Index ¶
- type Agg
- type UnaryAgg
- func (a *UnaryAgg[T1, T2]) BatchFill(start int64, os []uint8, vps []uint64, zs []int64, vecs []*vector.Vector)
- func (a *UnaryAgg[T1, T2]) BatchMerge(b Agg[any], start int64, os []uint8, vps []uint64)
- func (a *UnaryAgg[T1, T2]) BulkFill(i int64, zs []int64, vecs []*vector.Vector)
- func (a *UnaryAgg[T1, T2]) Dup() Agg[any]
- func (a *UnaryAgg[T1, T2]) Eval(m *mheap.Mheap) (*vector.Vector, error)
- func (a *UnaryAgg[T1, T2]) Fill(i int64, sel, z int64, vecs []*vector.Vector)
- func (a *UnaryAgg[T1, T2]) Free(m *mheap.Mheap)
- func (a *UnaryAgg[T1, T2]) Grows(size int, m *mheap.Mheap) error
- func (a *UnaryAgg[T1, T2]) InputTypes() []types.Type
- func (a *UnaryAgg[T1, T2]) Merge(b Agg[any], x, y int64)
- func (a *UnaryAgg[T1, T2]) OutputType() types.Type
- func (a *UnaryAgg[T1, T2]) String() string
- type UnaryDistAgg
- func (a *UnaryDistAgg[T1, T2]) BatchFill(start int64, os []uint8, vps []uint64, zs []int64, vecs []*vector.Vector)
- func (a *UnaryDistAgg[T1, T2]) BatchMerge(b Agg[any], start int64, os []uint8, vps []uint64)
- func (a *UnaryDistAgg[T1, T2]) BulkFill(i int64, zs []int64, vecs []*vector.Vector)
- func (a *UnaryDistAgg[T1, T2]) Dup() Agg[any]
- func (a *UnaryDistAgg[T1, T2]) Eval(m *mheap.Mheap) (*vector.Vector, error)
- func (a *UnaryDistAgg[T1, T2]) Fill(i int64, sel, z int64, vecs []*vector.Vector)
- func (a *UnaryDistAgg[T1, T2]) Free(m *mheap.Mheap)
- func (a *UnaryDistAgg[T1, T2]) Grows(size int, m *mheap.Mheap) error
- func (a *UnaryDistAgg[T1, T2]) InputTypes() []types.Type
- func (a *UnaryDistAgg[T1, T2]) Merge(b Agg[any], x, y int64)
- func (a *UnaryDistAgg[T1, T2]) OutputType() types.Type
- func (a *UnaryDistAgg[T1, T2]) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agg ¶
type Agg[T any] interface { // Dup will duplicate a new agg with the same type. Dup() Agg[any] // Type return the type of the agg's result. OutputType() types.Type // InputType return the type of the agg's input. InputTypes() []types.Type // String return related information of the agg. // used to show query plans. String() string // Free the agg. Free(*mheap.Mheap) // Grows allocates n groups for the agg. Grows(n int, _ *mheap.Mheap) error // Eval method calculates and returns the final result of the aggregate function. Eval(_ *mheap.Mheap) (*vector.Vector, error) // Fill use the rowIndex-rows of vector to update the data of groupIndex-group. // rowCount indicates the number of times the rowIndex-row is repeated. Fill(groupIndex int64, rowIndex int64, rowCount int64, vecs []*vector.Vector) // BulkFill use a whole vector to update the data of agg's group // groupIndex is the index number of the group // rowCounts is the count number of each row. BulkFill(groupIndex int64, rowCounts []int64, vecs []*vector.Vector) // BatchFill use part of the vector to update the data of agg's group // os(origin-s) records information about which groups need to be updated // if length of os is N, we use first N of vps to do update work. // And if os[i] > 0, it means the agg's (vps[i]-1)th group is a new one (never been assigned a value), // Maybe this feature can help us to do some optimization work. // So we use the os as a parameter but not len(os). // // agg's (vps[i]-1)th group is related to vector's (offset+i)th row. // rowCounts[i] is count number of the row[i] // For a more detailed introduction of rowCounts, please refer to comments of Function Fill. BatchFill(offset int64, os []uint8, vps []uint64, rowCounts []int64, vecs []*vector.Vector) // Merge will merge a couple of group between 2 aggregate function structures. // It merges the groupIndex1-group of agg1 and // groupIndex2-group of agg2 Merge(agg2 Agg[any], groupIndex1 int64, groupIndex2 int64) // BatchAdd merges multi groups of agg1 and agg2 // agg1's (vps[i]-1)th group is related to agg2's (start+i)th group // For more introduction of os, please refer to comments of Function BatchFill. BatchMerge(agg2 Agg[any], start int64, os []uint8, vps []uint64) }
func NewUnaryAgg ¶
type UnaryAgg ¶
type UnaryAgg[T1, T2 any] struct { // contains filtered or unexported fields }
generic aggregation function with one input vector and without distinct
func (*UnaryAgg[T1, T2]) BatchMerge ¶
func (*UnaryAgg[T1, T2]) InputTypes ¶
func (*UnaryAgg[T1, T2]) OutputType ¶
type UnaryDistAgg ¶
type UnaryDistAgg[T1, T2 any] struct { // contains filtered or unexported fields }
generic aggregation function with one input vector and with distinct
func (*UnaryDistAgg[T1, T2]) BatchMerge ¶
func (*UnaryDistAgg[T1, T2]) BulkFill ¶
func (a *UnaryDistAgg[T1, T2]) BulkFill(i int64, zs []int64, vecs []*vector.Vector)
func (*UnaryDistAgg[T1, T2]) Dup ¶
func (a *UnaryDistAgg[T1, T2]) Dup() Agg[any]
func (*UnaryDistAgg[T1, T2]) Fill ¶
func (a *UnaryDistAgg[T1, T2]) Fill(i int64, sel, z int64, vecs []*vector.Vector)
func (*UnaryDistAgg[T1, T2]) Free ¶
func (a *UnaryDistAgg[T1, T2]) Free(m *mheap.Mheap)
func (*UnaryDistAgg[T1, T2]) Grows ¶
func (a *UnaryDistAgg[T1, T2]) Grows(size int, m *mheap.Mheap) error
func (*UnaryDistAgg[T1, T2]) InputTypes ¶
func (a *UnaryDistAgg[T1, T2]) InputTypes() []types.Type
func (*UnaryDistAgg[T1, T2]) Merge ¶
func (a *UnaryDistAgg[T1, T2]) Merge(b Agg[any], x, y int64)
a[x] += b[y]
func (*UnaryDistAgg[T1, T2]) OutputType ¶
func (a *UnaryDistAgg[T1, T2]) OutputType() types.Type
func (*UnaryDistAgg[T1, T2]) String ¶
func (a *UnaryDistAgg[T1, T2]) String() string
Click to show internal directories.
Click to hide internal directories.