batch

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchToProtoBatch added in v0.6.0

func BatchToProtoBatch(bat *Batch) (*api.Batch, error)

func Cow

func Cow(bat *Batch)

func Length

func Length(bat *Batch) int

func Reorder

func Reorder(bat *Batch, attrs []string)

func SetLength

func SetLength(bat *Batch, n int)

Types

type Batch

type Batch struct {
	// Ro if true, Attrs is read only
	Ro bool
	// reference count, default is 1
	Cnt int64
	// Attrs column name list
	Attrs []string
	// Vecs col data
	Vecs []*vector.Vector
	// ring
	Zs   []int64
	Aggs []agg.Agg[any]
	Ht   any // hash table
}

Batch represents a part of a relationship including an optional list of row numbers, columns and list of attributes

(SelsData, Sels) - list of row numbers
(Attrs) - list of attributes
(vecs) 	- columns

func New

func New(ro bool, attrs []string) *Batch

func NewWithSize added in v0.5.0

func NewWithSize(n int) *Batch

func ProtoBatchToBatch added in v0.6.0

func ProtoBatchToBatch(bat *api.Batch) (*Batch, error)

func (*Batch) Append

func (bat *Batch) Append(mh *mpool.MPool, b *Batch) (*Batch, error)

func (*Batch) Clean added in v0.5.0

func (bat *Batch) Clean(m *mpool.MPool)

func (*Batch) ExpandNulls added in v0.5.1

func (bat *Batch) ExpandNulls()

func (*Batch) GetSubBatch added in v0.6.0

func (bat *Batch) GetSubBatch(cols []string) *Batch

func (*Batch) GetVector added in v0.5.0

func (bat *Batch) GetVector(pos int32) *vector.Vector

func (*Batch) InitZsOne

func (bat *Batch) InitZsOne(len int)

InitZsOne init Batch.Zs and values are all 1

func (*Batch) Length added in v0.5.0

func (bat *Batch) Length() int

func (*Batch) MarshalBinary added in v0.6.0

func (bat *Batch) MarshalBinary() ([]byte, error)

func (*Batch) Prefetch added in v0.5.0

func (bat *Batch) Prefetch(poses []int32, vecs []*vector.Vector)

func (*Batch) SetAttributes added in v0.6.0

func (bat *Batch) SetAttributes(attrs []string)

func (*Batch) SetVector added in v0.6.0

func (bat *Batch) SetVector(pos int32, vec *vector.Vector)

func (*Batch) SetZs added in v0.6.0

func (bat *Batch) SetZs(len int, m *mpool.MPool)

XXX I will slowly remove all code that uses InitZsone.

func (*Batch) Shrink added in v0.5.0

func (bat *Batch) Shrink(sels []int64)

func (*Batch) Shuffle added in v0.5.0

func (bat *Batch) Shuffle(sels []int64, m *mpool.MPool) error

func (*Batch) Size added in v0.6.0

func (bat *Batch) Size() int

func (*Batch) String

func (bat *Batch) String() string

func (*Batch) UnmarshalBinary added in v0.6.0

func (bat *Batch) UnmarshalBinary(data []byte) error

func (*Batch) VectorCount added in v0.6.0

func (bat *Batch) VectorCount() int

type EncodeBatch added in v0.6.0

type EncodeBatch struct {
	Zs       []int64
	Vecs     []*vector.Vector
	Attrs    []string
	AggInfos []aggInfo
}

Jump to

Keyboard shortcuts

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