mark

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Build = iota
	Probe
	End
)

Variables

This section is empty.

Functions

func DumpBatch

func DumpBatch(originBatch *batch.Batch, proc *process.Process, sels []int64) (*batch.Batch, error)

Types

type Argument

type Argument struct {

	// records the result cols' position that the build table needs to return
	Result []int32
	// because we have two tables here,so it's a slice
	// Conditions[i] stands for the table_i's expression
	// we ned this to eval first, if there is a expression
	// like  t.a+1, we will eval it first and then to build
	// hashtable and probe to get the result. note that,though
	// we have two tables, but len(Conditions[0]) == len(Conditions[1])
	// for example, select * from t1 join t2 on t1.a = t2.d+t2.e+t2.f;
	// We will get Condition below:
	// for t1: Expr_Col --> t1.a
	// for t2: Expr_F(arg0,arg1)
	// and the arg0 is Expr_F(t2.d,t2.e)
	// and the arg1 is Expr_Col --> t2.f
	// so from the view of above, the len of two Conditions is the same
	// then you will see I just make the evals with len(Conditions[0]),but
	// I will use evalJoinConditions with parameters Conditions[0] or Conditions[1]
	// they are both ok
	Conditions [][]*plan.Expr

	Typs []types.Type
	Cond *plan.Expr

	OnList   []*plan.Expr
	HashOnPK bool

	vm.OperatorBase
	// contains filtered or unexported fields
}

remember that we may use partition stragey, for example, if the origin table has data squence like 1,2,3,4. If we use the hash method, after using hash function,assume that we get 13,14,15,16. and we divide them into 3 buckets. so 13%3 = 1,so 3 is in the 1-th bucket and so on like this

func NewArgument added in v1.2.0

func NewArgument() *Argument

func (*Argument) Call added in v1.1.0

func (arg *Argument) Call(proc *process.Process) (vm.CallResult, error)

func (*Argument) Free

func (arg *Argument) Free(proc *process.Process, pipelineFailed bool, err error)

func (*Argument) GetOperatorBase added in v1.2.0

func (arg *Argument) GetOperatorBase() *vm.OperatorBase

func (*Argument) Prepare added in v1.1.0

func (arg *Argument) Prepare(proc *process.Process) error

func (*Argument) Release added in v1.2.0

func (arg *Argument) Release()

func (*Argument) String added in v1.1.0

func (arg *Argument) String(buf *bytes.Buffer)

func (Argument) TypeName added in v1.2.0

func (arg Argument) TypeName() string

Jump to

Keyboard shortcuts

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