Documentation ¶
Index ¶
- func ConstructResultOfShowCreateTable(ctx sctx.Context, tableInfo *model.TableMeta, buf *bytes.Buffer) (err error)
- func NewFirstChunk(e Executor) *chunk.Chunk
- func Next(ctx context.Context, e Executor, req *chunk.Chunk) error
- func PrintStack()
- type AggExec
- type AggWorker
- type BatchPointGetExecutor
- type Compiler
- type CountWorker
- type DDLExec
- type DeleteExec
- type Executor
- type ExecutorBuilder
- type FakerExec
- type InsertExec
- type LimitExec
- type ParallelScanExecutor
- type ProjExec
- type SelectionExec
- type SetExec
- type ShowExec
- type SimpleExec
- type SimpleScanExecutor
- type SortExec
- type SplitIndexRegionExec
- type TableDualExec
- type TableScanExec
- type UpdateExec
- type ZettaScanExec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructResultOfShowCreateTable ¶
func ConstructResultOfShowCreateTable(ctx sctx.Context, tableInfo *model.TableMeta, buf *bytes.Buffer) (err error)
ConstructResultOfShowCreateTable constructs the result for show create table.
func NewFirstChunk ¶
newFirstChunk creates a new chunk to buffer current executor's result.
func PrintStack ¶
func PrintStack()
Types ¶
type AggExec ¶
func (*AggExec) Schema ¶
func (e *AggExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type BatchPointGetExecutor ¶
type BatchPointGetExecutor struct {
// contains filtered or unexported fields
}
func (*BatchPointGetExecutor) Close ¶
func (e *BatchPointGetExecutor) Close() error
Close closes all executors and release all resources.
func (*BatchPointGetExecutor) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*BatchPointGetExecutor) Schema ¶
func (e *BatchPointGetExecutor) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type CountWorker ¶
type CountWorker struct {
// contains filtered or unexported fields
}
type DDLExec ¶
type DDLExec struct {
// contains filtered or unexported fields
}
DDLExec represents a DDL executor. It grabs a DDL instance from Domain, calling the DDL methods to do the work.
func (*DDLExec) Close ¶
func (e *DDLExec) Close() error
Close closes all executors and release all resources.
func (*DDLExec) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*DDLExec) Schema ¶
func (e *DDLExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type DeleteExec ¶
type DeleteExec struct {
// contains filtered or unexported fields
}
func (*DeleteExec) Close ¶
func (e *DeleteExec) Close() error
func (*DeleteExec) Schema ¶
func (e *DeleteExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type Executor ¶
type Executor interface { Open(context.Context) error Next(ctx context.Context, req *chunk.Chunk) error Close() error Schema() *expression.Schema // contains filtered or unexported methods }
Executor is the physical implementation of a algebra operator.
In TiDB, all algebra operators are implemented as iterators, i.e., they support a simple Open-Next-Close protocol. See this paper for more details:
"Volcano-An Extensible and Parallel Query Evaluation System"
Different from Volcano's execution model, a "Next" function call in TiDB will return a batch of rows, other than a single row in Volcano. NOTE: Executors must call "chk.Reset()" before appending their results to it.
type ExecutorBuilder ¶
type FakerExec ¶
type FakerExec struct {
// contains filtered or unexported fields
}
func (*FakerExec) Close ¶
func (e *FakerExec) Close() error
Close closes all executors and release all resources.
func (*FakerExec) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*FakerExec) Schema ¶
func (e *FakerExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type InsertExec ¶
type InsertExec struct {
// contains filtered or unexported fields
}
func (*InsertExec) Close ¶
func (e *InsertExec) Close() error
Close closes all executors and release all resources.
func (*InsertExec) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*InsertExec) Schema ¶
func (e *InsertExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type LimitExec ¶
type LimitExec struct {
// contains filtered or unexported fields
}
LimitExec represents limit executor It ignores 'Offset' rows from src, then returns 'Count' rows at maximum.
func (*LimitExec) Schema ¶
func (e *LimitExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type ParallelScanExecutor ¶
type ParallelScanExecutor struct {
// contains filtered or unexported fields
}
use for table rows counting for now.
func (*ParallelScanExecutor) Close ¶
func (e *ParallelScanExecutor) Close() error
Close closes all executors and release all resources.
func (*ParallelScanExecutor) Schema ¶
func (e *ParallelScanExecutor) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type ProjExec ¶
type ProjExec struct { Exprs []expression.Expression // contains filtered or unexported fields }
func (*ProjExec) Schema ¶
func (e *ProjExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type SelectionExec ¶
type SelectionExec struct {
// contains filtered or unexported fields
}
func (*SelectionExec) Close ¶
func (e *SelectionExec) Close() error
func (*SelectionExec) Schema ¶
func (e *SelectionExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type SetExec ¶
type SetExec struct {
// contains filtered or unexported fields
}
func (*SetExec) Close ¶
func (e *SetExec) Close() error
Close closes all executors and release all resources.
func (*SetExec) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*SetExec) Schema ¶
func (e *SetExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type ShowExec ¶
type ShowExec struct { Tp ast.ShowStmtType Plan *planner.LogicalShow GlobalScope bool // contains filtered or unexported fields }
func (*ShowExec) Close ¶
func (e *ShowExec) Close() error
Close closes all executors and release all resources.
func (*ShowExec) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*ShowExec) Schema ¶
func (s *ShowExec) Schema() *expression.Schema
type SimpleExec ¶
func (*SimpleExec) Close ¶
func (e *SimpleExec) Close() error
Close closes all executors and release all resources.
func (*SimpleExec) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*SimpleExec) Schema ¶
func (e *SimpleExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type SimpleScanExecutor ¶
type SimpleScanExecutor struct {
// contains filtered or unexported fields
}
func (*SimpleScanExecutor) Close ¶
func (e *SimpleScanExecutor) Close() error
Close closes all executors and release all resources.
func (*SimpleScanExecutor) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*SimpleScanExecutor) Schema ¶
func (e *SimpleScanExecutor) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type SortExec ¶
type SortExec struct { ByItems []*planner.ByItems Idx int // contains filtered or unexported fields }
SortExec represents sorting executor.
func (*SortExec) Next ¶
Next implements the Executor Next interface. Sort constructs the result following these step:
- Read as mush as rows into memory.
- If memory quota is triggered, sort these rows in memory and put them into disk as partition 1, then reset the memory quota trigger and return to step 1
- If memory quota is not triggered and child is consumed, sort these rows in memory as partition N.
- Merge sort if the count of partitions is larger than 1. If there is only one partition in step 4, it works just like in-memory sort before.
func (*SortExec) Schema ¶
func (e *SortExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type SplitIndexRegionExec ¶
type SplitIndexRegionExec struct {
// contains filtered or unexported fields
}
func (*SplitIndexRegionExec) Close ¶
func (e *SplitIndexRegionExec) Close() error
Close closes all executors and release all resources.
func (*SplitIndexRegionExec) Open ¶
func (e *SplitIndexRegionExec) Open(ctx context.Context) (err error)
func (*SplitIndexRegionExec) Schema ¶
func (e *SplitIndexRegionExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type TableDualExec ¶
type TableDualExec struct {
// contains filtered or unexported fields
}
TableDualExec represents a dual table executor.
func (*TableDualExec) Close ¶
func (e *TableDualExec) Close() error
Close closes all executors and release all resources.
func (*TableDualExec) Open ¶
func (e *TableDualExec) Open(ctx context.Context) error
Open implements the Executor Open interface.
func (*TableDualExec) Schema ¶
func (e *TableDualExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type TableScanExec ¶
type TableScanExec struct { IdxVals []types.Datum Index *model.IndexMeta PkVals []types.Datum Limit uint64 // contains filtered or unexported fields }
func (*TableScanExec) Close ¶
func (t *TableScanExec) Close() error
func (*TableScanExec) Schema ¶
func (e *TableScanExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type UpdateExec ¶
type UpdateExec struct {
// contains filtered or unexported fields
}
func (*UpdateExec) Close ¶
func (e *UpdateExec) Close() error
func (*UpdateExec) Schema ¶
func (e *UpdateExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.
type ZettaScanExec ¶
type ZettaScanExec struct {
// contains filtered or unexported fields
}
func (*ZettaScanExec) Close ¶
func (e *ZettaScanExec) Close() error
Close closes all executors and release all resources.
func (*ZettaScanExec) Open ¶
Open initializes children recursively and "childrenResults" according to children's schemas.
func (*ZettaScanExec) Schema ¶
func (e *ZettaScanExec) Schema() *expression.Schema
Schema returns the current baseExecutor's schema. If it is nil, then create and return a new one.