process

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 6 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 FreeRegisters

func FreeRegisters(proc *Process)

func Get

func Get(proc *Process, size int64, typ types.Type) (*vector.Vector, error)

func GetSels

func GetSels(proc *Process) []int64

func Put

func Put(proc *Process, vec *vector.Vector)

func PutSels

func PutSels(sels []int64, proc *Process)

Types

type Limitation

type Limitation struct {
	// Size, memory threshold.
	Size int64
	// BatchRows, max rows for batch.
	BatchRows int64
	// BatchSize, max size for batch.
	BatchSize int64
	// PartitionRows, max rows for partition.
	PartitionRows int64
}

Limitation specifies the maximum resources that can be used in one query.

type Process

type Process struct {
	// Id, query id.
	Id  string
	Reg Register
	Lim Limitation
	Mp  *mheap.Mheap

	// unix timestamp
	UnixTime int64

	// snapshot is transaction context
	Snapshot []byte

	SessionInfo SessionInfo

	// snapshot is transaction context
	Cancel context.CancelFunc
}

Process contains context used in query execution one or more pipeline will be generated for one query, and one pipeline has one process instance.

func New

func New(m *mheap.Mheap) *Process

New creates a new Process. A process stores the execution context.

func NewFromProc added in v0.5.0

func NewFromProc(m *mheap.Mheap, p *Process, regNumber int) *Process

NewFromProc create a new Process based on another process.

func (*Process) AllocScalarNullVector added in v0.5.0

func (proc *Process) AllocScalarNullVector(typ types.Type) *vector.Vector

func (*Process) AllocScalarVector added in v0.5.0

func (proc *Process) AllocScalarVector(typ types.Type) *vector.Vector

func (*Process) AllocVector added in v0.5.0

func (proc *Process) AllocVector(typ types.Type, size int64) (*vector.Vector, error)

func (*Process) GetBoolTyp added in v0.5.0

func (proc *Process) GetBoolTyp(typ types.Type) (typ2 types.Type)

type Register

type Register struct {
	// Ss, temporarily stores the row number list in the execution of operators
	// and it can be reused in the future execution.
	Ss [][]int64
	// InputBatch, stores the result of the previous operator.
	InputBatch *batch.Batch
	// Vecs, temporarily stores the column data in the execution of operators
	// and it can be reused in the future execution to avoid mem alloc and type casting overhead.
	Vecs []*vector.Vector
	// MergeReceivers, receives result of multi previous operators from other pipelines
	// e.g. merge operator.
	MergeReceivers []*WaitRegister
}

Register used in execution pipeline and shared with all operators of the same pipeline.

type SessionInfo added in v0.5.0

type SessionInfo struct {
	User         string
	Host         string
	Role         string
	ConnectionID uint64
	Database     string
	Version      string
}

session information

func (*SessionInfo) GetCharset added in v0.5.0

func (si *SessionInfo) GetCharset() string

func (*SessionInfo) GetCollation added in v0.5.0

func (si *SessionInfo) GetCollation() string

func (*SessionInfo) GetConnectionID added in v0.5.0

func (si *SessionInfo) GetConnectionID() uint64

func (*SessionInfo) GetDatabase added in v0.5.0

func (si *SessionInfo) GetDatabase() string

func (*SessionInfo) GetHost added in v0.5.0

func (si *SessionInfo) GetHost() string

func (*SessionInfo) GetRole added in v0.5.0

func (si *SessionInfo) GetRole() string

func (*SessionInfo) GetUser added in v0.5.0

func (si *SessionInfo) GetUser() string

func (*SessionInfo) GetUserHost added in v0.5.0

func (si *SessionInfo) GetUserHost() string

func (*SessionInfo) GetVersion added in v0.5.0

func (si *SessionInfo) GetVersion() string

type WaitRegister

type WaitRegister struct {
	Ctx context.Context
	Ch  chan *batch.Batch
}

WaitRegister channel

Jump to

Keyboard shortcuts

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