mark

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Build = iota
	Probe
	End
)

Variables

This section is empty.

Functions

func Call

func Call(idx int, proc *process.Process, arg any, isFirst bool, isLast bool) (process.ExecStatus, error)

func DumpBatch

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

func Prepare

func Prepare(proc *process.Process, arg any) error

func String

func String(_ any, buf *bytes.Buffer)

Types

type Argument

type Argument struct {

	// Ibucket determines the data partition this operator need to deal with
	Ibucket uint64
	// Nbucket means how many partitions there are
	Nbucket uint64

	// 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
	// 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 (*Argument) Free

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

Jump to

Keyboard shortcuts

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