batch

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(bat *Batch, m *mheap.Mheap)

func Cow

func Cow(bat *Batch)

func GetVector

func GetVector(bat *Batch, name string) *vector.Vector

func GetVectorIndex

func GetVectorIndex(bat *Batch, name string) int

func Length

func Length(bat *Batch) int

func Prefetch

func Prefetch(bat *Batch, attrs []string, vecs []*vector.Vector)

func Reduce

func Reduce(bat *Batch, attrs []string, m *mheap.Mheap)

func Reorder

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

func SetLength

func SetLength(bat *Batch, n int)

func Shrink

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

func Shuffle

func Shuffle(bat *Batch, m *mheap.Mheap) error

Types

type Batch

type Batch struct {
	// Ro if true, Attrs is read only
	Ro bool
	// SelsData encoded row number list
	SelsData []byte
	// Sels row number list
	Sels []int64
	// Attrs column name list
	Attrs []string
	// Vecs col data
	Vecs []*vector.Vector
	// ring
	Zs     []int64
	As     []string // alias list
	Refs   []uint64 // reference count
	Rs     []ring.Ring
	Ht     interface{} // hash table
	Result *DumpResult
}

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 (*Batch) Append

func (bat *Batch) Append(mh *mheap.Mheap, b *Batch) (*Batch, error)

func (*Batch) InitZsOne

func (bat *Batch) InitZsOne(len int)

InitZsOne init Batch.Zs and values are all 1

func (*Batch) String

func (bat *Batch) String() string

type DecodeItem

type DecodeItem struct {
	// Attrs column name list
	Attrs []string
	// column data, origin Data
	Vecs []DumpDecodeItem
}

type DumpDecodeItem

type DumpDecodeItem []interface{}

type DumpKey

type DumpKey []byte

type DumpOption

type DumpOption struct {
	Db_name       []string
	Table_name    []string
	Keys          bool
	Values        bool
	Decode_key    bool
	Decode_value  bool
	Limit         []uint64
	Filename      string
	Max_file_size int64
	Writer        *bufio.Writer
	PrimaryKey    []byte
	ReadCnt       uint64
	UseKey        bool
	PrimaryValue  []string
	UseValue      bool
}

type DumpResult

type DumpResult struct {
	Keys          []DumpKey
	Values        []DumpValue
	Decode_keys   DecodeItem
	Decode_values DecodeItem
}

type DumpValue

type DumpValue []byte

Jump to

Keyboard shortcuts

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