colexec

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 'mo_indexes' table
	MO_INDEX_ID          = "id"
	MO_INDEX_TABLE_ID    = "table_id"
	MO_INDEX_DATABASE_ID = "database_id"
	MO_INDEX_NAME        = "name"
	// MO_INDEX_TYPE can have values : unique, primary or multiple.
	// It is better called as MO_INDEX_CATEGORY. But for now, we will keep it as MO_INDEX_TYPE.
	// The INDEX_TYPE in MYSQL has values BTREE, FULLTEXT, HASH, RTREE
	// Ref: https://dev.mysql.com/doc/mysql-infoschema-excerpt/5.7/en/information-schema-statistics-table.html
	MO_INDEX_TYPE                 = "type"
	MO_INDEX_ALGORITHM            = "algo"
	MO_INDEX_ALGORITHM_TABLE_TYPE = "algo_table_type"
	MO_INDEX_ALGORITHM_PARAMS     = "algo_params"
	MO_INDEX_IS_VISIBLE           = "is_visible"
	MO_INDEX_HIDDEN               = "hidden"
	MO_INDEX_COMMENT              = "comment"
	MO_INDEX_OPTIONS              = "options"
	MO_INDEX_COLUMN_NAME          = "column_name"
	MO_INDEX_ORDINAL_POSITION     = "ordinal_position"
	MO_INDEX_TABLE_NAME           = "index_table_name"
	MO_INDEX_PRIKEY               = catalog.CPrimaryKeyColName
)
View Source
const (
	INDEX_TYPE_PRIMARY  = "PRIMARY"
	INDEX_TYPE_UNIQUE   = "UNIQUE"
	INDEX_TYPE_MULTIPLE = "MULTIPLE"
	INDEX_TYPE_FULLTEXT = "FULLTEXT"
	INDEX_TYPE_SPATIAL  = "SPATIAL"
)
View Source
const (
	// WriteS3Threshold when batches'  size of table reaches this, we will
	// trigger write s3
	WriteS3Threshold         = 128 * mpool.MB
	FaultInjectedS3Threshold = 512 * mpool.KB
)
View Source
const (
	ALLOCID_INDEX_KEY = "index_key"
)
View Source
const (
	DefaultBatchSize = objectio.BlockMaxRows
)
View Source
const (
	TxnWorkspaceUnCommitType = 1
)

Variables

Column type mapping of table 'mo_indexes'

View Source
var (
	// TxnWorkspaceSegment includes a dedicated header which indicates it is a workspace segment.
	TxnWorkspaceSegment = types.Segmentid([16]byte{
		0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0xFF,
	})
)

Functions

func AllocCNS3ResultBat

func AllocCNS3ResultBat(
	isTombstone bool,
	isMemoryTable bool,
) *batch.Batch

func BatchDataNotNullCheck added in v0.8.0

func BatchDataNotNullCheck(vecs []*vector.Vector, attrs []string, tableDef *plan.TableDef, ctx context.Context) error

func DebugShowExecutor

func DebugShowExecutor(executor ExpressionExecutor) (string, error)

DebugShowExecutor prints the tree of ExpressionExecutor starting from root, similar as func DebugShowScopes

func EvaluateFilterByZoneMap added in v0.8.0

func EvaluateFilterByZoneMap(
	ctx context.Context,
	proc *process.Process,
	expr *plan.Expr,
	meta objectio.ColumnMetaFetcher,
	columnMap map[int]int,
	zms []objectio.ZoneMap,
	vecs []*vector.Vector) (selected bool)

func ExpandObjectStatsToBatch

func ExpandObjectStatsToBatch(
	mp *mpool.MPool,
	isTombstone bool,
	outBath *batch.Batch,
	isCNCreated bool,
	statsList ...objectio.ObjectStats,
) (err error)

func FillPartitionBatchForDelete

func FillPartitionBatchForDelete(proc *process.Process, input *batch.Batch, buffer *batch.Batch, expect int32, rowIdIdx int, partitionIdx int, pkIdx int) error

FillPartitionBatchForDelete fills the data into the corresponding batch based on the different partitions to which the current `row_id` data belongs.

func FillPartitionBatchForInsert

func FillPartitionBatchForInsert(proc *process.Process, input *batch.Batch, buffer *batch.Batch, expect int32, partitionIdx int) error

FillPartitionBatchForInsert fills the partition batch for insert operation.

func FilterRowIdForDel added in v0.8.0

func FilterRowIdForDel(proc *process.Process, retBat *batch.Batch, srcBat *batch.Batch,
	idx int, primaryKeyIdx int) error

func GenerateConstListExpressionExecutor added in v1.0.0

func GenerateConstListExpressionExecutor(proc *process.Process, exprs []*plan.Expr) (*vector.Vector, error)

func GetExprZoneMap added in v0.8.0

func GetExprZoneMap(
	ctx context.Context,
	proc *process.Process,
	expr *plan.Expr,
	meta objectio.ColumnMetaFetcher,
	columnMap map[int]int,
	zms []objectio.ZoneMap,
	vecs []*vector.Vector) (v objectio.ZoneMap)

func GetNewRelation added in v0.6.0

func GetNewRelation(eg engine.Engine, dbName, tbleName string, txn client.TxnOperator, ctx context.Context) (engine.Relation, error)

func GetReadonlyResultFromExpression

func GetReadonlyResultFromExpression(
	proc *process.Process,
	planExpr *plan.Expr, data []*batch.Batch) (vec *vector.Vector, freeMethod func(), err error)

GetReadonlyResultFromExpression return a readonly result and its free method from expression and input data.

func GetReadonlyResultFromNoColumnExpression

func GetReadonlyResultFromNoColumnExpression(
	proc *process.Process,
	planExpr *plan.Expr) (vec *vector.Vector, freeMethod func(), err error)

GetReadonlyResultFromNoColumnExpression returns a readonly vector and its free method from planExpression. This function requires that expression cannot take any column expression, for example, 'a+1' is an invalid expression because a is a column expression.

func GetRelAndPartitionRelsByObjRef

func GetRelAndPartitionRelsByObjRef(
	ctx context.Context,
	proc *process.Process,
	eng engine.Engine,
	ref *plan.ObjectRef,
) (source engine.Relation, err error)

func GetSequmsAttrsSortKeyIdxFromTableDef

func GetSequmsAttrsSortKeyIdxFromTableDef(
	tableDef *plan.TableDef,
) ([]uint16, []types.Type, []string, int, bool)

func GetSharedFSFromProc

func GetSharedFSFromProc(proc *process.Process) (fs fileservice.FileService, err error)

func GetWritableResultFromExpression

func GetWritableResultFromExpression(
	proc *process.Process,
	planExpr *plan.Expr, data []*batch.Batch) (vec *vector.Vector, err error)

GetWritableResultFromExpression return a writable result and its free method from expression and input data.

func GetWritableResultFromNoColumnExpression

func GetWritableResultFromNoColumnExpression(
	proc *process.Process,
	planExpr *plan.Expr) (vec *vector.Vector, err error)

GetWritableResultFromNoColumnExpression has the same requirement for input expression. this function returns a writable / editable vector whose memory will belong to caller.

func InsertIndexMetadata added in v0.8.0

func InsertIndexMetadata(eg engine.Engine, ctx context.Context, db engine.Database, proc *process.Process, tblName string) error

InsertIndexMetadata :Synchronize the index metadata information of the table to the index metadata table

func InsertOneIndexMetadata added in v0.8.0

func InsertOneIndexMetadata(eg engine.Engine, ctx context.Context, db engine.Database, proc *process.Process, tblName string, idxdef *plan.IndexDef) error

InsertOneIndexMetadata :Synchronize the single index metadata information into the index metadata table

func IsDeletionOnTxnUnCommit

func IsDeletionOnTxnUnCommit(
	segmentMap map[string]int32,
	segId *types.Segmentid,
	tableId uint64,
	txnID []byte,
) bool

func IsDeletionOnTxnUnCommitInMem

func IsDeletionOnTxnUnCommitInMem(
	segmentMap map[string]int32,
	segId *types.Segmentid,
	tableId uint64,
	txnID []byte,
) bool

IsDeletionOnTxnUnCommitInMem check if the segId is an UnCommit inmem segment in the workspace. if the input map is nil, this check will be done by the colexec.Get.

func IsDeletionOnTxnUnCommitPersisted

func IsDeletionOnTxnUnCommitPersisted(
	segmentMap map[string]int32,
	segId *types.Segmentid,
	tableId uint64,
	txnID []byte,
) bool

IsDeletionOnTxnUnCommitPersisted check if the segId is an UnCommit and flushed segment in the workspace. if the input map is nil, this check will be done by the colexec.Get.

func MakeMockBatchs

func MakeMockBatchs(mp *mpool.MPool) *batch.Batch

new batchs with schema : (a int, b uuid, c varchar, d json, e datetime)

func MakeMockBatchsWithNullVec

func MakeMockBatchsWithNullVec(mp *mpool.MPool) *batch.Batch

new batchs with schema : (a int auto_increment, b uuid, c varchar, d json, e date) vecs[0] is null, use for test preinsert...

func MakeMockBatchsWithNullVec1

func MakeMockBatchsWithNullVec1(mp *mpool.MPool) *batch.Batch

func MakeMockBatchsWithRowID

func MakeMockBatchsWithRowID(mp *mpool.MPool) *batch.Batch

new batchs with schema : (a int, b uuid, c varchar, d json, e date)

func MakeMockPartitionBatchs

func MakeMockPartitionBatchs(val int32, mp *mpool.MPool) *batch.Batch

func MakeMockTimeWinBatchs

func MakeMockTimeWinBatchs(mp *mpool.MPool) *batch.Batch

func NewJoinBatch added in v0.8.0

func NewJoinBatch(bat *batch.Batch, mp *mpool.MPool) (*batch.Batch,
	[]func(*vector.Vector, *vector.Vector, int64, int) error)

func ReceiveBitmapFromChannel

func ReceiveBitmapFromChannel(usr context.Context, ch chan *bitmap.Bitmap) *bitmap.Bitmap

func RecordTxnUnCommitSegment

func RecordTxnUnCommitSegment(txnID []byte, tableId uint64, segId *types.Segmentid)

func RewriteFilterExprList

func RewriteFilterExprList(list []*plan.Expr) *plan.Expr

RewriteFilterExprList will convert an expression list to be an AndExpr

func Set added in v1.2.0

func Set(s *Server)

func SetJoinBatchValues added in v0.8.0

func SetJoinBatchValues(joinBat, bat *batch.Batch, sel int64, length int,
	cfs []func(*vector.Vector, *vector.Vector, int64, int) error) error

func SortByKey

func SortByKey(
	proc *process.Process,
	bat *batch.Batch,
	sortIndex int,
	allow_null bool,
	m *mpool.MPool,
) error

reference to pkg/sql/colexec/order/order.go logic

func SplitAndExprs added in v0.6.0

func SplitAndExprs(list []*plan.Expr) []*plan.Expr

Types

type Batches

type Batches struct {
	Buf     []*batch.Batch
	MemSize int64
}

func (*Batches) Clean

func (bs *Batches) Clean(mp *mpool.MPool)

func (*Batches) CleanOnlyData

func (bs *Batches) CleanOnlyData()

func (*Batches) CopyIntoBatches

func (bs *Batches) CopyIntoBatches(src *batch.Batch, proc *process.Process) (err error)

copy from input batch into batches the batches structure hold data in fix size 8192 rows, and continue to append from next batch if error return , the batches will clean itself

func (*Batches) Reset

func (bs *Batches) Reset()

func (*Batches) RowCount

func (bs *Batches) RowCount() int

func (*Batches) Shrink

func (bs *Batches) Shrink(ignoreRow *bitmap.Bitmap, proc *process.Process) error

type CNS3Writer

type CNS3Writer struct {
	// contains filtered or unexported fields
}

func NewCNS3DataWriter

func NewCNS3DataWriter(
	mp *mpool.MPool,
	fs fileservice.FileService,
	tableDef *plan.TableDef,
	memoryThreshold int,
	flushOnSync bool,
	sinkerOpts ...ioutil.SinkerOption,
) *CNS3Writer

`flushOnSync` true means memoryThreshold is math.MaxInt `memoryThreshold` 1. only effect when `flushOnSync` is false 2. < 0 use default threshold

func NewCNS3TombstoneWriter

func NewCNS3TombstoneWriter(
	mp *mpool.MPool,
	fs fileservice.FileService,
	pkType types.Type,
	memoryThreshold int,
	opts ...ioutil.SinkerOption,
) *CNS3Writer

func (*CNS3Writer) Close

func (w *CNS3Writer) Close() (err error)

func (*CNS3Writer) FillBlockInfoBat

func (w *CNS3Writer) FillBlockInfoBat() (*batch.Batch, error)

func (*CNS3Writer) MemorySizeThreshold

func (w *CNS3Writer) MemorySizeThreshold() int

func (*CNS3Writer) OutputInMemoryData

func (w *CNS3Writer) OutputInMemoryData(result *batch.Batch) (err error)

func (*CNS3Writer) Reset

func (w *CNS3Writer) Reset()

Reset discards any buffered or staged data accumulated since the last Sync, without tearing down the underlying sinker. Call this when the enclosing pipeline execution is being reset so that stale data is not carried into the next execution. The sinker's buffer pool and arena are kept alive for efficient reuse.

func (*CNS3Writer) ResetBlockInfoBat

func (w *CNS3Writer) ResetBlockInfoBat()

func (*CNS3Writer) String

func (w *CNS3Writer) String() string

func (*CNS3Writer) Sync

func (w *CNS3Writer) Sync(ctx context.Context) (stats []objectio.ObjectStats, err error)

func (*CNS3Writer) SyncAndFillBlockInfoBat

func (w *CNS3Writer) SyncAndFillBlockInfoBat(ctx context.Context) (*batch.Batch, error)

func (*CNS3Writer) Write

func (w *CNS3Writer) Write(ctx context.Context, bat *batch.Batch) error

func (*CNS3Writer) WriteOwned

func (w *CNS3Writer) WriteOwned(ctx context.Context, bat *batch.Batch) (bool, error)

type CnSegmentMap added in v0.8.0

type CnSegmentMap struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type ColumnExpressionExecutor added in v0.8.0

type ColumnExpressionExecutor struct {
	// contains filtered or unexported fields
}

func NewColumnExpressionExecutor added in v1.2.0

func NewColumnExpressionExecutor() *ColumnExpressionExecutor

func (*ColumnExpressionExecutor) Eval added in v0.8.0

func (expr *ColumnExpressionExecutor) Eval(_ *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*ColumnExpressionExecutor) EvalWithoutResultReusing added in v0.8.0

func (expr *ColumnExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*ColumnExpressionExecutor) Free added in v0.8.0

func (expr *ColumnExpressionExecutor) Free()

func (*ColumnExpressionExecutor) GetColIndex added in v1.0.0

func (expr *ColumnExpressionExecutor) GetColIndex() int

func (*ColumnExpressionExecutor) GetRelIndex added in v1.0.0

func (expr *ColumnExpressionExecutor) GetRelIndex() int

func (*ColumnExpressionExecutor) IsColumnExpr added in v0.8.0

func (expr *ColumnExpressionExecutor) IsColumnExpr() bool

func (*ColumnExpressionExecutor) ResetForNextQuery

func (expr *ColumnExpressionExecutor) ResetForNextQuery()

func (ColumnExpressionExecutor) TypeName added in v1.2.0

func (expr ColumnExpressionExecutor) TypeName() string

type ExprEvalVector

type ExprEvalVector struct {
	Executor []ExpressionExecutor
	Vec      []*vector.Vector
	Typ      []types.Type
}

func MakeEvalVector

func MakeEvalVector(proc *process.Process, expressions []*plan.Expr) (ev ExprEvalVector, err error)

func (*ExprEvalVector) Free

func (ev *ExprEvalVector) Free()

func (*ExprEvalVector) ResetForNextQuery

func (ev *ExprEvalVector) ResetForNextQuery()

type ExpressionExecutor added in v0.8.0

type ExpressionExecutor interface {
	// Eval evaluates the expression and returns the result vector.
	// The result is a read-only vector that is only valid until the next call to Eval.
	Eval(proc *process.Process, batches []*batch.Batch, selectList []bool) (*vector.Vector, error)

	// EvalWithoutResultReusing will be removed in the future.
	// It's used to evaluate the expression,
	// and the result's ownership is transferred to the caller except for the column expression.
	EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, selectList []bool) (*vector.Vector, error)

	// ResetForNextQuery resets the expression to its initial state for a same expression.
	// this is useful to a prepare statement.
	ResetForNextQuery()

	// Free closes the expression and releases all resources.
	Free()

	// IsColumnExpr returns true if the expression is a column expression.
	IsColumnExpr() bool

	TypeName() string
}

ExpressionExecutor generated from plan.Expr, can evaluate the result from vectors directly.

func NewExpressionExecutor added in v0.8.0

func NewExpressionExecutor(proc *process.Process, planExpr *plan.Expr) (ExpressionExecutor, error)

func NewExpressionExecutorsFromPlanExpressions added in v0.8.0

func NewExpressionExecutorsFromPlanExpressions(proc *process.Process, planExprs []*plan.Expr) (executors []ExpressionExecutor, err error)

type FixedVectorExpressionExecutor added in v0.8.0

type FixedVectorExpressionExecutor struct {
	// contains filtered or unexported fields
}

FixedVectorExpressionExecutor the content of its vector is fixed. e.g.

ConstVector [1, 1, 1, 1, 1]
ConstVector [null, null, null]
ListVector  ["1", "2", "3", null, "5"]

func NewFixedVectorExpressionExecutor added in v1.2.0

func NewFixedVectorExpressionExecutor(m *mpool.MPool, fixed bool, resultVector *vector.Vector) *FixedVectorExpressionExecutor

func (*FixedVectorExpressionExecutor) Eval added in v0.8.0

func (expr *FixedVectorExpressionExecutor) Eval(_ *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*FixedVectorExpressionExecutor) EvalWithoutResultReusing added in v0.8.0

func (expr *FixedVectorExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*FixedVectorExpressionExecutor) Free added in v0.8.0

func (expr *FixedVectorExpressionExecutor) Free()

func (*FixedVectorExpressionExecutor) IsColumnExpr added in v0.8.0

func (expr *FixedVectorExpressionExecutor) IsColumnExpr() bool

func (*FixedVectorExpressionExecutor) ResetForNextQuery

func (expr *FixedVectorExpressionExecutor) ResetForNextQuery()

func (FixedVectorExpressionExecutor) TypeName added in v1.2.0

func (expr FixedVectorExpressionExecutor) TypeName() string

type FunctionExpressionExecutor added in v0.8.0

type FunctionExpressionExecutor struct {
	// contains filtered or unexported fields
}

func NewFunctionExpressionExecutor added in v1.2.0

func NewFunctionExpressionExecutor() *FunctionExpressionExecutor

func (*FunctionExpressionExecutor) Eval added in v0.8.0

func (expr *FunctionExpressionExecutor) Eval(proc *process.Process, batches []*batch.Batch, selectList []bool) (*vector.Vector, error)

func (*FunctionExpressionExecutor) EvalCase

func (expr *FunctionExpressionExecutor) EvalCase(proc *process.Process, batches []*batch.Batch, selectList []bool) (err error)

func (*FunctionExpressionExecutor) EvalIff

func (expr *FunctionExpressionExecutor) EvalIff(proc *process.Process, batches []*batch.Batch, selectList []bool) (err error)

func (*FunctionExpressionExecutor) EvalWithoutResultReusing added in v0.8.0

func (expr *FunctionExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*FunctionExpressionExecutor) Free added in v0.8.0

func (expr *FunctionExpressionExecutor) Free()

func (*FunctionExpressionExecutor) Init added in v0.8.0

func (expr *FunctionExpressionExecutor) Init(
	proc *process.Process,
	parameterNum int,
	retType types.Type) (err error)

func (*FunctionExpressionExecutor) IsColumnExpr added in v0.8.0

func (expr *FunctionExpressionExecutor) IsColumnExpr() bool

func (*FunctionExpressionExecutor) ResetForNextQuery

func (expr *FunctionExpressionExecutor) ResetForNextQuery()

func (*FunctionExpressionExecutor) SetParameter added in v0.8.0

func (expr *FunctionExpressionExecutor) SetParameter(index int, executor ExpressionExecutor)

func (FunctionExpressionExecutor) TypeName added in v1.2.0

func (expr FunctionExpressionExecutor) TypeName() string

type ListExpressionExecutor

type ListExpressionExecutor struct {
	// contains filtered or unexported fields
}

func NewListExpressionExecutor

func NewListExpressionExecutor() *ListExpressionExecutor

func (*ListExpressionExecutor) Eval

func (expr *ListExpressionExecutor) Eval(proc *process.Process, batches []*batch.Batch, selectList []bool) (*vector.Vector, error)

func (*ListExpressionExecutor) EvalWithoutResultReusing

func (expr *ListExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*ListExpressionExecutor) Free

func (expr *ListExpressionExecutor) Free()

func (*ListExpressionExecutor) Init

func (expr *ListExpressionExecutor) Init(proc *process.Process, typ types.Type, parameterNum int)

func (*ListExpressionExecutor) IsColumnExpr

func (expr *ListExpressionExecutor) IsColumnExpr() bool

func (*ListExpressionExecutor) ResetForNextQuery

func (expr *ListExpressionExecutor) ResetForNextQuery()

func (*ListExpressionExecutor) SetParameter

func (expr *ListExpressionExecutor) SetParameter(index int, executor ExpressionExecutor)

func (ListExpressionExecutor) TypeName

func (expr ListExpressionExecutor) TypeName() string

type MockOperator

type MockOperator struct {
	vm.OperatorBase
	// contains filtered or unexported fields
}

func NewMockOperator

func NewMockOperator() *MockOperator

func (*MockOperator) Call

func (op *MockOperator) Call(proc *process.Process) (vm.CallResult, error)

func (*MockOperator) ExecProjection

func (op *MockOperator) ExecProjection(proc *process.Process, input *batch.Batch) (*batch.Batch, error)

func (*MockOperator) Free

func (op *MockOperator) Free(proc *process.Process, pipelineFailed bool, err error)

func (*MockOperator) GetBatchs

func (op *MockOperator) GetBatchs() []*batch.Batch

func (*MockOperator) GetOperatorBase

func (op *MockOperator) GetOperatorBase() *vm.OperatorBase

func (*MockOperator) OpType

func (op *MockOperator) OpType() vm.OpType

func (*MockOperator) Prepare

func (op *MockOperator) Prepare(proc *process.Process) (err error)

func (*MockOperator) Release

func (op *MockOperator) Release()

func (*MockOperator) Reset

func (op *MockOperator) Reset(proc *process.Process, pipelineFailed bool, err error)

func (*MockOperator) ResetBatchs

func (op *MockOperator) ResetBatchs()

func (*MockOperator) String

func (op *MockOperator) String(buf *bytes.Buffer)

func (*MockOperator) WithBatchs

func (op *MockOperator) WithBatchs(batchs []*batch.Batch) *MockOperator

type ParamExpressionExecutor added in v0.8.0

type ParamExpressionExecutor struct {
	// contains filtered or unexported fields
}

func NewParamExpressionExecutor added in v1.2.0

func NewParamExpressionExecutor(mp *mpool.MPool, pos int, typ types.Type) *ParamExpressionExecutor

func (*ParamExpressionExecutor) Eval added in v0.8.0

func (expr *ParamExpressionExecutor) Eval(proc *process.Process, _ []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*ParamExpressionExecutor) EvalWithoutResultReusing added in v0.8.0

func (expr *ParamExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*ParamExpressionExecutor) Free added in v0.8.0

func (expr *ParamExpressionExecutor) Free()

func (*ParamExpressionExecutor) IsColumnExpr added in v0.8.0

func (expr *ParamExpressionExecutor) IsColumnExpr() bool

func (*ParamExpressionExecutor) ResetForNextQuery

func (expr *ParamExpressionExecutor) ResetForNextQuery()

func (ParamExpressionExecutor) TypeName added in v1.2.0

func (expr ParamExpressionExecutor) TypeName() string

type Projection

type Projection struct {
	ProjectList      []*plan.Expr
	ProjectExecutors []ExpressionExecutor
	ProjectAllocSize int64
	// contains filtered or unexported fields
}

func (*Projection) EvalProjection

func (projection *Projection) EvalProjection(bat *batch.Batch, proc *process.Process) (*batch.Batch, error)

func (*Projection) FreeProjection

func (projection *Projection) FreeProjection(proc *process.Process)

func (*Projection) PrepareProjection

func (projection *Projection) PrepareProjection(proc *process.Process) (err error)

func (*Projection) ResetProjection

func (projection *Projection) ResetProjection(proc *process.Process)

type ReceiveInfo added in v0.7.0

type ReceiveInfo struct {
	// it's useless
	NodeAddr string
	Uuid     uuid.UUID
}

ReceiveInfo used to spec which node, and which registers you need

type ResultPos added in v0.6.0

type ResultPos struct {
	Rel int32
	Pos int32
}

func NewResultPos added in v0.6.0

func NewResultPos(rel int32, pos int32) ResultPos

type RunningPipelineMapForRemoteNode added in v1.2.1

type RunningPipelineMapForRemoteNode struct {
	sync.Mutex
	// contains filtered or unexported fields
}

RunningPipelineMapForRemoteNode is a map to record which pipeline was built for a remote node. these pipelines will send data to a remote node, we record them for a better control for their lives.

type Server added in v0.7.0

type Server struct {
	// contains filtered or unexported fields
}

func Get added in v1.2.0

func Get() *Server

func NewServer added in v0.7.0

func NewServer(client logservice.CNHAKeeperClient) *Server

func (*Server) CancelPipelineSending

func (srv *Server) CancelPipelineSending(
	session morpc.ClientSession, streamID uint64)

func (*Server) DeleteTxnSegmentIds added in v0.8.0

func (srv *Server) DeleteTxnSegmentIds(txnID []byte)

func (*Server) DeleteUuids added in v1.0.0

func (srv *Server) DeleteUuids(uuids []uuid.UUID)

func (*Server) GenerateObject added in v1.0.0

func (srv *Server) GenerateObject() objectio.ObjectName

GenerateObject used to generate a new object name for CN

func (*Server) GetCnSegmentMap added in v0.8.0

func (srv *Server) GetCnSegmentMap() map[string]int32

func (*Server) GetCnSegmentType added in v0.8.0

func (srv *Server) GetCnSegmentType(sid *objectio.Segmentid, tableId uint64, txnID []byte) int32

func (*Server) GetProcByUuid added in v1.0.0

func (srv *Server) GetProcByUuid(u uuid.UUID, forcedDelete bool) (*process.Process, process.RemotePipelineInformationChannel, bool)

GetProcByUuid used the uuid to get a process from the srv. if the process is nil, it means the process has done. if forcedDelete, do an action to avoid another routine to put a new item.

func (*Server) GetProcByUuidOrWait

func (srv *Server) GetProcByUuidOrWait(u uuid.UUID) (*process.Process, process.RemotePipelineInformationChannel, bool, <-chan struct{})

GetProcByUuidOrWait atomically looks up a uuid and, if not found, returns a channel that will be closed on the next map insertion. This avoids a race where an insert between a failed lookup and a separate WaitForChange call would be missed.

func (*Server) PutCnSegment added in v0.8.0

func (srv *Server) PutCnSegment(txnID []byte, tableId uint64, sid *objectio.Segmentid, segmentType int32)

func (*Server) PutProcIntoUuidMap added in v1.0.0

func (srv *Server) PutProcIntoUuidMap(u uuid.UUID, p *process.Process, ch process.RemotePipelineInformationChannel) error

func (*Server) RecordBuiltPipeline

func (srv *Server) RecordBuiltPipeline(
	session morpc.ClientSession, streamID uint64, proc *process.Process)

func (*Server) RecordDispatchPipeline

func (srv *Server) RecordDispatchPipeline(
	session morpc.ClientSession, streamID uint64, dispatchReceiver *process.WrapCs)

func (*Server) RemoveRelatedPipeline

func (srv *Server) RemoveRelatedPipeline(session morpc.ClientSession, streamID uint64)

type UuidProcMap added in v0.8.0

type UuidProcMap struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type VarExpressionExecutor added in v0.8.0

type VarExpressionExecutor struct {
	// contains filtered or unexported fields
}

func NewVarExpressionExecutor added in v1.2.0

func NewVarExpressionExecutor() *VarExpressionExecutor

func (*VarExpressionExecutor) Eval added in v0.8.0

func (expr *VarExpressionExecutor) Eval(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*VarExpressionExecutor) EvalWithoutResultReusing added in v0.8.0

func (expr *VarExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)

func (*VarExpressionExecutor) Free added in v0.8.0

func (expr *VarExpressionExecutor) Free()

func (*VarExpressionExecutor) IsColumnExpr added in v0.8.0

func (expr *VarExpressionExecutor) IsColumnExpr() bool

func (*VarExpressionExecutor) ResetForNextQuery

func (expr *VarExpressionExecutor) ResetForNextQuery()

func (VarExpressionExecutor) TypeName added in v1.2.0

func (expr VarExpressionExecutor) TypeName() string

Directories

Path Synopsis
Package externalwrite implements writing rows of a query/LOAD into the backing files of a writable external table.
Package externalwrite implements writing rows of a query/LOAD into the backing files of a writable external table.

Jump to

Keyboard shortcuts

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