Documentation
¶
Index ¶
- Constants
- Variables
- func AllocCNS3ResultBat(isTombstone bool, isMemoryTable bool) *batch.Batch
- func BatchDataNotNullCheck(vecs []*vector.Vector, attrs []string, tableDef *plan.TableDef, ...) error
- func DebugShowExecutor(executor ExpressionExecutor) (string, error)
- func EvaluateFilterByZoneMap(ctx context.Context, proc *process.Process, expr *plan.Expr, ...) (selected bool)
- func ExpandObjectStatsToBatch(mp *mpool.MPool, isTombstone bool, outBath *batch.Batch, isCNCreated bool, ...) (err error)
- func FillPartitionBatchForDelete(proc *process.Process, input *batch.Batch, buffer *batch.Batch, expect int32, ...) error
- func FillPartitionBatchForInsert(proc *process.Process, input *batch.Batch, buffer *batch.Batch, expect int32, ...) error
- func FilterRowIdForDel(proc *process.Process, retBat *batch.Batch, srcBat *batch.Batch, idx int, ...) error
- func GenerateConstListExpressionExecutor(proc *process.Process, exprs []*plan.Expr) (*vector.Vector, error)
- func GetExprZoneMap(ctx context.Context, proc *process.Process, expr *plan.Expr, ...) (v objectio.ZoneMap)
- func GetNewRelation(eg engine.Engine, dbName, tbleName string, txn client.TxnOperator, ...) (engine.Relation, error)
- func GetReadonlyResultFromExpression(proc *process.Process, planExpr *plan.Expr, data []*batch.Batch) (vec *vector.Vector, freeMethod func(), err error)
- func GetReadonlyResultFromNoColumnExpression(proc *process.Process, planExpr *plan.Expr) (vec *vector.Vector, freeMethod func(), err error)
- func GetRelAndPartitionRelsByObjRef(ctx context.Context, proc *process.Process, eng engine.Engine, ...) (source engine.Relation, err error)
- func GetSequmsAttrsSortKeyIdxFromTableDef(tableDef *plan.TableDef) ([]uint16, []types.Type, []string, int, bool)
- func GetSharedFSFromProc(proc *process.Process) (fs fileservice.FileService, err error)
- func GetWritableResultFromExpression(proc *process.Process, planExpr *plan.Expr, data []*batch.Batch) (vec *vector.Vector, err error)
- func GetWritableResultFromNoColumnExpression(proc *process.Process, planExpr *plan.Expr) (vec *vector.Vector, err error)
- func InsertIndexMetadata(eg engine.Engine, ctx context.Context, db engine.Database, ...) error
- func InsertOneIndexMetadata(eg engine.Engine, ctx context.Context, db engine.Database, ...) error
- func IsDeletionOnTxnUnCommit(segmentMap map[string]int32, segId *types.Segmentid, tableId uint64, ...) bool
- func IsDeletionOnTxnUnCommitInMem(segmentMap map[string]int32, segId *types.Segmentid, tableId uint64, ...) bool
- func IsDeletionOnTxnUnCommitPersisted(segmentMap map[string]int32, segId *types.Segmentid, tableId uint64, ...) bool
- func MakeMockBatchs(mp *mpool.MPool) *batch.Batch
- func MakeMockBatchsWithNullVec(mp *mpool.MPool) *batch.Batch
- func MakeMockBatchsWithNullVec1(mp *mpool.MPool) *batch.Batch
- func MakeMockBatchsWithRowID(mp *mpool.MPool) *batch.Batch
- func MakeMockPartitionBatchs(val int32, mp *mpool.MPool) *batch.Batch
- func MakeMockTimeWinBatchs(mp *mpool.MPool) *batch.Batch
- func NewJoinBatch(bat *batch.Batch, mp *mpool.MPool) (*batch.Batch, []func(*vector.Vector, *vector.Vector, int64, int) error)
- func ReceiveBitmapFromChannel(usr context.Context, ch chan *bitmap.Bitmap) *bitmap.Bitmap
- func RecordTxnUnCommitSegment(txnID []byte, tableId uint64, segId *types.Segmentid)
- func RewriteFilterExprList(list []*plan.Expr) *plan.Expr
- func Set(s *Server)
- func SetJoinBatchValues(joinBat, bat *batch.Batch, sel int64, length int, ...) error
- func SortByKey(proc *process.Process, bat *batch.Batch, sortIndex int, allow_null bool, ...) error
- func SplitAndExprs(list []*plan.Expr) []*plan.Expr
- type Batches
- func (bs *Batches) Clean(mp *mpool.MPool)
- func (bs *Batches) CleanOnlyData()
- func (bs *Batches) CopyIntoBatches(src *batch.Batch, proc *process.Process) (err error)
- func (bs *Batches) Reset()
- func (bs *Batches) RowCount() int
- func (bs *Batches) Shrink(ignoreRow *bitmap.Bitmap, proc *process.Process) error
- type CNS3Writer
- func (w *CNS3Writer) Close() (err error)
- func (w *CNS3Writer) FillBlockInfoBat() (*batch.Batch, error)
- func (w *CNS3Writer) MemorySizeThreshold() int
- func (w *CNS3Writer) OutputInMemoryData(result *batch.Batch) (err error)
- func (w *CNS3Writer) Reset()
- func (w *CNS3Writer) ResetBlockInfoBat()
- func (w *CNS3Writer) String() string
- func (w *CNS3Writer) Sync(ctx context.Context) (stats []objectio.ObjectStats, err error)
- func (w *CNS3Writer) SyncAndFillBlockInfoBat(ctx context.Context) (*batch.Batch, error)
- func (w *CNS3Writer) Write(ctx context.Context, bat *batch.Batch) error
- func (w *CNS3Writer) WriteOwned(ctx context.Context, bat *batch.Batch) (bool, error)
- type CnSegmentMap
- type ColumnExpressionExecutor
- func (expr *ColumnExpressionExecutor) Eval(_ *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *ColumnExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *ColumnExpressionExecutor) Free()
- func (expr *ColumnExpressionExecutor) GetColIndex() int
- func (expr *ColumnExpressionExecutor) GetRelIndex() int
- func (expr *ColumnExpressionExecutor) IsColumnExpr() bool
- func (expr *ColumnExpressionExecutor) ResetForNextQuery()
- func (expr ColumnExpressionExecutor) TypeName() string
- type ExprEvalVector
- type ExpressionExecutor
- type FixedVectorExpressionExecutor
- func (expr *FixedVectorExpressionExecutor) Eval(_ *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *FixedVectorExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *FixedVectorExpressionExecutor) Free()
- func (expr *FixedVectorExpressionExecutor) IsColumnExpr() bool
- func (expr *FixedVectorExpressionExecutor) ResetForNextQuery()
- func (expr FixedVectorExpressionExecutor) TypeName() string
- type FunctionExpressionExecutor
- func (expr *FunctionExpressionExecutor) Eval(proc *process.Process, batches []*batch.Batch, selectList []bool) (*vector.Vector, error)
- func (expr *FunctionExpressionExecutor) EvalCase(proc *process.Process, batches []*batch.Batch, selectList []bool) (err error)
- func (expr *FunctionExpressionExecutor) EvalIff(proc *process.Process, batches []*batch.Batch, selectList []bool) (err error)
- func (expr *FunctionExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *FunctionExpressionExecutor) Free()
- func (expr *FunctionExpressionExecutor) Init(proc *process.Process, parameterNum int, retType types.Type) (err error)
- func (expr *FunctionExpressionExecutor) IsColumnExpr() bool
- func (expr *FunctionExpressionExecutor) ResetForNextQuery()
- func (expr *FunctionExpressionExecutor) SetParameter(index int, executor ExpressionExecutor)
- func (expr FunctionExpressionExecutor) TypeName() string
- type ListExpressionExecutor
- func (expr *ListExpressionExecutor) Eval(proc *process.Process, batches []*batch.Batch, selectList []bool) (*vector.Vector, error)
- func (expr *ListExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *ListExpressionExecutor) Free()
- func (expr *ListExpressionExecutor) Init(proc *process.Process, typ types.Type, parameterNum int)
- func (expr *ListExpressionExecutor) IsColumnExpr() bool
- func (expr *ListExpressionExecutor) ResetForNextQuery()
- func (expr *ListExpressionExecutor) SetParameter(index int, executor ExpressionExecutor)
- func (expr ListExpressionExecutor) TypeName() string
- type MockOperator
- func (op *MockOperator) Call(proc *process.Process) (vm.CallResult, error)
- func (op *MockOperator) ExecProjection(proc *process.Process, input *batch.Batch) (*batch.Batch, error)
- func (op *MockOperator) Free(proc *process.Process, pipelineFailed bool, err error)
- func (op *MockOperator) GetBatchs() []*batch.Batch
- func (op *MockOperator) GetOperatorBase() *vm.OperatorBase
- func (op *MockOperator) OpType() vm.OpType
- func (op *MockOperator) Prepare(proc *process.Process) (err error)
- func (op *MockOperator) Release()
- func (op *MockOperator) Reset(proc *process.Process, pipelineFailed bool, err error)
- func (op *MockOperator) ResetBatchs()
- func (op *MockOperator) String(buf *bytes.Buffer)
- func (op *MockOperator) WithBatchs(batchs []*batch.Batch) *MockOperator
- type ParamExpressionExecutor
- func (expr *ParamExpressionExecutor) Eval(proc *process.Process, _ []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *ParamExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *ParamExpressionExecutor) Free()
- func (expr *ParamExpressionExecutor) IsColumnExpr() bool
- func (expr *ParamExpressionExecutor) ResetForNextQuery()
- func (expr ParamExpressionExecutor) TypeName() string
- type Projection
- func (projection *Projection) EvalProjection(bat *batch.Batch, proc *process.Process) (*batch.Batch, error)
- func (projection *Projection) FreeProjection(proc *process.Process)
- func (projection *Projection) PrepareProjection(proc *process.Process) (err error)
- func (projection *Projection) ResetProjection(proc *process.Process)
- type ReceiveInfo
- type ResultPos
- type RunningPipelineMapForRemoteNode
- type Server
- func (srv *Server) CancelPipelineSending(session morpc.ClientSession, streamID uint64)
- func (srv *Server) DeleteTxnSegmentIds(txnID []byte)
- func (srv *Server) DeleteUuids(uuids []uuid.UUID)
- func (srv *Server) GenerateObject() objectio.ObjectName
- func (srv *Server) GetCnSegmentMap() map[string]int32
- func (srv *Server) GetCnSegmentType(sid *objectio.Segmentid, tableId uint64, txnID []byte) int32
- func (srv *Server) GetProcByUuid(u uuid.UUID, forcedDelete bool) (*process.Process, process.RemotePipelineInformationChannel, bool)
- func (srv *Server) GetProcByUuidOrWait(u uuid.UUID) (*process.Process, process.RemotePipelineInformationChannel, bool, ...)
- func (srv *Server) PutCnSegment(txnID []byte, tableId uint64, sid *objectio.Segmentid, segmentType int32)
- func (srv *Server) PutProcIntoUuidMap(u uuid.UUID, p *process.Process, ch process.RemotePipelineInformationChannel) error
- func (srv *Server) RecordBuiltPipeline(session morpc.ClientSession, streamID uint64, proc *process.Process)
- func (srv *Server) RecordDispatchPipeline(session morpc.ClientSession, streamID uint64, dispatchReceiver *process.WrapCs)
- func (srv *Server) RemoveRelatedPipeline(session morpc.ClientSession, streamID uint64)
- type UuidProcMap
- type VarExpressionExecutor
- func (expr *VarExpressionExecutor) Eval(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *VarExpressionExecutor) EvalWithoutResultReusing(proc *process.Process, batches []*batch.Batch, _ []bool) (*vector.Vector, error)
- func (expr *VarExpressionExecutor) Free()
- func (expr *VarExpressionExecutor) IsColumnExpr() bool
- func (expr *VarExpressionExecutor) ResetForNextQuery()
- func (expr VarExpressionExecutor) TypeName() string
Constants ¶
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 )
const ( INDEX_TYPE_PRIMARY = "PRIMARY" INDEX_TYPE_UNIQUE = "UNIQUE" INDEX_TYPE_MULTIPLE = "MULTIPLE" INDEX_TYPE_FULLTEXT = "FULLTEXT" INDEX_TYPE_SPATIAL = "SPATIAL" )
const ( // WriteS3Threshold when batches' size of table reaches this, we will // trigger write s3 WriteS3Threshold = 128 * mpool.MB FaultInjectedS3Threshold = 512 * mpool.KB )
const (
ALLOCID_INDEX_KEY = "index_key"
)
const (
DefaultBatchSize = objectio.BlockMaxRows
)
const (
TxnWorkspaceUnCommitType = 1
)
Variables ¶
var MO_INDEX_COLTYPE = map[string]types.T{ MO_INDEX_ID: types.T_uint64, MO_INDEX_TABLE_ID: types.T_uint64, MO_INDEX_DATABASE_ID: types.T_uint64, MO_INDEX_NAME: types.T_varchar, MO_INDEX_TYPE: types.T_varchar, MO_INDEX_ALGORITHM: types.T_varchar, MO_INDEX_ALGORITHM_TABLE_TYPE: types.T_varchar, MO_INDEX_ALGORITHM_PARAMS: types.T_varchar, MO_INDEX_IS_VISIBLE: types.T_int8, MO_INDEX_HIDDEN: types.T_int8, MO_INDEX_COMMENT: types.T_varchar, MO_INDEX_COLUMN_NAME: types.T_varchar, MO_INDEX_ORDINAL_POSITION: types.T_uint32, MO_INDEX_OPTIONS: types.T_text, MO_INDEX_TABLE_NAME: types.T_varchar, MO_INDEX_PRIKEY: types.T_varchar, }
Column type mapping of table 'mo_indexes'
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 BatchDataNotNullCheck ¶ added in v0.8.0
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 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 GenerateConstListExpressionExecutor ¶ added in v1.0.0
func GetExprZoneMap ¶ added in v0.8.0
func GetNewRelation ¶ added in v0.6.0
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 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 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 ¶
new batchs with schema : (a int, b uuid, c varchar, d json, e datetime)
func MakeMockBatchsWithNullVec ¶
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 MakeMockBatchsWithRowID ¶
new batchs with schema : (a int, b uuid, c varchar, d json, e date)
func MakeMockPartitionBatchs ¶
func NewJoinBatch ¶ added in v0.8.0
func RewriteFilterExprList ¶
RewriteFilterExprList will convert an expression list to be an AndExpr
func SetJoinBatchValues ¶ added in v0.8.0
Types ¶
type Batches ¶
func (*Batches) CleanOnlyData ¶
func (bs *Batches) CleanOnlyData()
func (*Batches) CopyIntoBatches ¶
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
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 (*CNS3Writer) WriteOwned ¶
type CnSegmentMap ¶ added in v0.8.0
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) EvalWithoutResultReusing ¶ added in v0.8.0
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 (*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 NewExpressionExecutorsFromPlanExpressions ¶ added in v0.8.0
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 (*FixedVectorExpressionExecutor) EvalWithoutResultReusing ¶ added in v0.8.0
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) EvalWithoutResultReusing ¶ added in v0.8.0
func (*FunctionExpressionExecutor) Free ¶ added in v0.8.0
func (expr *FunctionExpressionExecutor) Free()
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) EvalWithoutResultReusing ¶
func (*ListExpressionExecutor) Free ¶
func (expr *ListExpressionExecutor) Free()
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 (*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) 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 (*ParamExpressionExecutor) EvalWithoutResultReusing ¶ added in v0.8.0
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) 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
ReceiveInfo used to spec which node, and which registers you need
type ResultPos ¶ added in v0.6.0
func NewResultPos ¶ added in v0.6.0
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 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 (*Server) DeleteUuids ¶ added in v1.0.0
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 (*Server) GetCnSegmentType ¶ added in v0.8.0
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 (*Server) PutProcIntoUuidMap ¶ added in v1.0.0
func (*Server) RecordBuiltPipeline ¶
func (*Server) RecordDispatchPipeline ¶
func (*Server) RemoveRelatedPipeline ¶
func (srv *Server) RemoveRelatedPipeline(session morpc.ClientSession, streamID uint64)
type UuidProcMap ¶ added in v0.8.0
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) EvalWithoutResultReusing ¶ added in v0.8.0
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
Source Files
¶
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. |