Documentation ¶
Index ¶
- Variables
- type AggregateFuncExtractor
- type BatchPointGetPlan
- func (p BatchPointGetPlan) Init(ctx sctx.Context, schema *expression.Schema, names []*types.FieldName) *BatchPointGetPlan
- func (s *BatchPointGetPlan) OutputNames() types.NameSlice
- func (s *BatchPointGetPlan) Schema() *expression.Schema
- func (s *BatchPointGetPlan) SetOutputNames(names types.NameSlice)
- func (s *BatchPointGetPlan) SetSchema(schema *expression.Schema)
- type ByItems
- type DDL
- type DataSource
- func (d DataSource) Init(ctx sctx.Context) *DataSource
- func (s *DataSource) OutputNames() types.NameSlice
- func (d *DataSource) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
- func (d *DataSource) PushFilterDown(exprs []expression.Expression) []expression.Expression
- func (d *DataSource) PushFilterDown2(exprs []expression.Expression) []expression.Expression
- func (d *DataSource) PushLimitDown(limit uint64)
- func (s *DataSource) Schema() *expression.Schema
- func (s *DataSource) SetOutputNames(names types.NameSlice)
- func (s *DataSource) SetSchema(schema *expression.Schema)
- func (d *DataSource) Table() table.Table
- type Delete
- type Insert
- type LogicalAggregation
- func (la *LogicalAggregation) GetUsedCols() (usedCols []*expression.Column)
- func (la LogicalAggregation) Init(ctx sctx.Context) *LogicalAggregation
- func (s *LogicalAggregation) OutputNames() types.NameSlice
- func (p *LogicalAggregation) PushLimitDown(limit uint64)
- func (s *LogicalAggregation) Schema() *expression.Schema
- func (s *LogicalAggregation) SetOutputNames(names types.NameSlice)
- func (s *LogicalAggregation) SetSchema(schema *expression.Schema)
- type LogicalLimit
- func (blp *LogicalLimit) Children() []LogicalPlan
- func (p LogicalLimit) Init(ctx sctx.Context) *LogicalLimit
- func (p *LogicalLimit) OutputNames() types.NameSlice
- func (blp *LogicalLimit) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
- func (blp *LogicalLimit) PushFilterDown(exprs []expression.Expression) []expression.Expression
- func (blp *LogicalLimit) PushLimitDown(limit uint64)
- func (p *LogicalLimit) Schema() *expression.Schema
- func (blp *LogicalLimit) SetChild(i int, child LogicalPlan)
- func (blp *LogicalLimit) SetChildren(children ...LogicalPlan)
- type LogicalPlan
- type LogicalProjection
- func (p LogicalProjection) Init(ctx sctx.Context) *LogicalProjection
- func (s *LogicalProjection) OutputNames() types.NameSlice
- func (p *LogicalProjection) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
- func (s *LogicalProjection) Schema() *expression.Schema
- func (s *LogicalProjection) SetOutputNames(names types.NameSlice)
- func (s *LogicalProjection) SetSchema(schema *expression.Schema)
- type LogicalSelection
- func (blp *LogicalSelection) Children() []LogicalPlan
- func (p LogicalSelection) Init(ctx sctx.Context) *LogicalSelection
- func (p *LogicalSelection) OutputNames() types.NameSlice
- func (p *LogicalSelection) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
- func (p *LogicalSelection) PushFilterDown(exprs []expression.Expression) []expression.Expression
- func (blp *LogicalSelection) PushLimitDown(limit uint64)
- func (p *LogicalSelection) Schema() *expression.Schema
- func (blp *LogicalSelection) SetChild(i int, child LogicalPlan)
- func (blp *LogicalSelection) SetChildren(children ...LogicalPlan)
- type LogicalShow
- type LogicalSort
- func (blp *LogicalSort) Children() []LogicalPlan
- func (p LogicalSort) Init(ctx sctx.Context) *LogicalSort
- func (p *LogicalSort) OutputNames() types.NameSlice
- func (blp *LogicalSort) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
- func (blp *LogicalSort) PushFilterDown(exprs []expression.Expression) []expression.Expression
- func (p *LogicalSort) PushLimitDown(limit uint64)
- func (p *LogicalSort) Schema() *expression.Schema
- func (blp *LogicalSort) SetChild(i int, child LogicalPlan)
- func (blp *LogicalSort) SetChildren(children ...LogicalPlan)
- type LogicalTableDual
- func (p LogicalTableDual) Init(ctx sctx.Context) *LogicalTableDual
- func (s *LogicalTableDual) OutputNames() types.NameSlice
- func (s *LogicalTableDual) Schema() *expression.Schema
- func (s *LogicalTableDual) SetOutputNames(names types.NameSlice)
- func (s *LogicalTableDual) SetSchema(schema *expression.Schema)
- type LogicalUpdate
- func (blp *LogicalUpdate) Children() []LogicalPlan
- func (p LogicalUpdate) Init(ctx sctx.Context) *LogicalUpdate
- func (blp *LogicalUpdate) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
- func (blp *LogicalUpdate) PushFilterDown(exprs []expression.Expression) []expression.Expression
- func (blp *LogicalUpdate) PushLimitDown(limit uint64)
- func (blp *LogicalUpdate) SetChild(i int, child LogicalPlan)
- func (blp *LogicalUpdate) SetChildren(children ...LogicalPlan)
- type PhysicalPlan
- type Plan
- type PlanBuilder
- type Set
- type ShowContents
- type Simple
- type SimpleScanPlan
- func (p SimpleScanPlan) Init(ctx sctx.Context, schema *expression.Schema, names []*types.FieldName) *SimpleScanPlan
- func (s *SimpleScanPlan) OutputNames() types.NameSlice
- func (s *SimpleScanPlan) Schema() *expression.Schema
- func (s *SimpleScanPlan) SetOutputNames(names types.NameSlice)
- func (s *SimpleScanPlan) SetSchema(schema *expression.Schema)
- type SplitRegion
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnsupportedType = terror.ClassOptimizer.New(mysql.ErrUnsupportedType, mysql.MySQLErrName[mysql.ErrUnsupportedType]) ErrAnalyzeMissIndex = terror.ClassOptimizer.New(mysql.ErrAnalyzeMissIndex, mysql.MySQLErrName[mysql.ErrAnalyzeMissIndex]) ErrWrongParamCount = terror.ClassOptimizer.New(mysql.ErrWrongParamCount, mysql.MySQLErrName[mysql.ErrWrongParamCount]) ErrSchemaChanged = terror.ClassOptimizer.New(mysql.ErrSchemaChanged, mysql.MySQLErrName[mysql.ErrSchemaChanged]) ErrTablenameNotAllowedHere = terror.ClassOptimizer.New(mysql.ErrTablenameNotAllowedHere, mysql.MySQLErrName[mysql.ErrTablenameNotAllowedHere]) ErrNotSupportedYet = terror.ClassOptimizer.New(mysql.ErrNotSupportedYet, mysql.MySQLErrName[mysql.ErrNotSupportedYet]) ErrWrongUsage = terror.ClassOptimizer.New(mysql.ErrWrongUsage, mysql.MySQLErrName[mysql.ErrWrongUsage]) ErrUnknown = terror.ClassOptimizer.New(mysql.ErrUnknown, mysql.MySQLErrName[mysql.ErrUnknown]) ErrUnknownTable = terror.ClassOptimizer.New(mysql.ErrUnknownTable, mysql.MySQLErrName[mysql.ErrUnknownTable]) ErrNoSuchTable = terror.ClassOptimizer.New(mysql.ErrNoSuchTable, mysql.MySQLErrName[mysql.ErrNoSuchTable]) ErrWrongArguments = terror.ClassOptimizer.New(mysql.ErrWrongArguments, mysql.MySQLErrName[mysql.ErrWrongArguments]) ErrWrongNumberOfColumnsInSelect = terror.ClassOptimizer.New(mysql.ErrWrongNumberOfColumnsInSelect, mysql.MySQLErrName[mysql.ErrWrongNumberOfColumnsInSelect]) ErrBadGeneratedColumn = terror.ClassOptimizer.New(mysql.ErrBadGeneratedColumn, mysql.MySQLErrName[mysql.ErrBadGeneratedColumn]) ErrFieldNotInGroupBy = terror.ClassOptimizer.New(mysql.ErrFieldNotInGroupBy, mysql.MySQLErrName[mysql.ErrFieldNotInGroupBy]) ErrBadTable = terror.ClassOptimizer.New(mysql.ErrBadTable, mysql.MySQLErrName[mysql.ErrBadTable]) ErrKeyDoesNotExist = terror.ClassOptimizer.New(mysql.ErrKeyDoesNotExist, mysql.MySQLErrName[mysql.ErrKeyDoesNotExist]) ErrOperandColumns = terror.ClassOptimizer.New(mysql.ErrOperandColumns, mysql.MySQLErrName[mysql.ErrOperandColumns]) ErrInvalidGroupFuncUse = terror.ClassOptimizer.New(mysql.ErrInvalidGroupFuncUse, mysql.MySQLErrName[mysql.ErrInvalidGroupFuncUse]) ErrIllegalReference = terror.ClassOptimizer.New(mysql.ErrIllegalReference, mysql.MySQLErrName[mysql.ErrIllegalReference]) ErrNoDB = terror.ClassOptimizer.New(mysql.ErrNoDB, mysql.MySQLErrName[mysql.ErrNoDB]) ErrUnknownExplainFormat = terror.ClassOptimizer.New(mysql.ErrUnknownExplainFormat, mysql.MySQLErrName[mysql.ErrUnknownExplainFormat]) ErrWrongGroupField = terror.ClassOptimizer.New(mysql.ErrWrongGroupField, mysql.MySQLErrName[mysql.ErrWrongGroupField]) ErrDupFieldName = terror.ClassOptimizer.New(mysql.ErrDupFieldName, mysql.MySQLErrName[mysql.ErrDupFieldName]) ErrNonUpdatableTable = terror.ClassOptimizer.New(mysql.ErrNonUpdatableTable, mysql.MySQLErrName[mysql.ErrNonUpdatableTable]) ErrInternal = terror.ClassOptimizer.New(mysql.ErrInternal, mysql.MySQLErrName[mysql.ErrInternal]) ErrNonUniqTable = terror.ClassOptimizer.New(mysql.ErrNonuniqTable, mysql.MySQLErrName[mysql.ErrNonuniqTable]) ErrWindowInvalidWindowFuncUse = terror.ClassOptimizer.New(mysql.ErrWindowInvalidWindowFuncUse, mysql.MySQLErrName[mysql.ErrWindowInvalidWindowFuncUse]) ErrWindowInvalidWindowFuncAliasUse = terror.ClassOptimizer.New(mysql.ErrWindowInvalidWindowFuncAliasUse, mysql.MySQLErrName[mysql.ErrWindowInvalidWindowFuncAliasUse]) ErrWindowNoSuchWindow = terror.ClassOptimizer.New(mysql.ErrWindowNoSuchWindow, mysql.MySQLErrName[mysql.ErrWindowNoSuchWindow]) ErrWindowCircularityInWindowGraph = terror.ClassOptimizer.New(mysql.ErrWindowCircularityInWindowGraph, mysql.MySQLErrName[mysql.ErrWindowCircularityInWindowGraph]) ErrWindowNoChildPartitioning = terror.ClassOptimizer.New(mysql.ErrWindowNoChildPartitioning, mysql.MySQLErrName[mysql.ErrWindowNoChildPartitioning]) ErrWindowNoInherentFrame = terror.ClassOptimizer.New(mysql.ErrWindowNoInherentFrame, mysql.MySQLErrName[mysql.ErrWindowNoInherentFrame]) ErrWindowNoRedefineOrderBy = terror.ClassOptimizer.New(mysql.ErrWindowNoRedefineOrderBy, mysql.MySQLErrName[mysql.ErrWindowNoRedefineOrderBy]) ErrWindowDuplicateName = terror.ClassOptimizer.New(mysql.ErrWindowDuplicateName, mysql.MySQLErrName[mysql.ErrWindowDuplicateName]) ErrPartitionClauseOnNonpartitioned = terror.ClassOptimizer.New(mysql.ErrPartitionClauseOnNonpartitioned, mysql.MySQLErrName[mysql.ErrPartitionClauseOnNonpartitioned]) ErrWindowFrameStartIllegal = terror.ClassOptimizer.New(mysql.ErrWindowFrameStartIllegal, mysql.MySQLErrName[mysql.ErrWindowFrameStartIllegal]) ErrWindowFrameEndIllegal = terror.ClassOptimizer.New(mysql.ErrWindowFrameEndIllegal, mysql.MySQLErrName[mysql.ErrWindowFrameEndIllegal]) ErrWindowFrameIllegal = terror.ClassOptimizer.New(mysql.ErrWindowFrameIllegal, mysql.MySQLErrName[mysql.ErrWindowFrameIllegal]) ErrWindowRangeFrameOrderType = terror.ClassOptimizer.New(mysql.ErrWindowRangeFrameOrderType, mysql.MySQLErrName[mysql.ErrWindowRangeFrameOrderType]) ErrWindowRangeFrameTemporalType = terror.ClassOptimizer.New(mysql.ErrWindowRangeFrameTemporalType, mysql.MySQLErrName[mysql.ErrWindowRangeFrameTemporalType]) ErrWindowRangeFrameNumericType = terror.ClassOptimizer.New(mysql.ErrWindowRangeFrameNumericType, mysql.MySQLErrName[mysql.ErrWindowRangeFrameNumericType]) ErrWindowRangeBoundNotConstant = terror.ClassOptimizer.New(mysql.ErrWindowRangeBoundNotConstant, mysql.MySQLErrName[mysql.ErrWindowRangeBoundNotConstant]) ErrWindowRowsIntervalUse = terror.ClassOptimizer.New(mysql.ErrWindowRowsIntervalUse, mysql.MySQLErrName[mysql.ErrWindowRowsIntervalUse]) ErrWindowFunctionIgnoresFrame = terror.ClassOptimizer.New(mysql.ErrWindowFunctionIgnoresFrame, mysql.MySQLErrName[mysql.ErrWindowFunctionIgnoresFrame]) ErrUnsupportedOnGeneratedColumn = terror.ClassOptimizer.New(mysql.ErrUnsupportedOnGeneratedColumn, mysql.MySQLErrName[mysql.ErrUnsupportedOnGeneratedColumn]) ErrPrivilegeCheckFail = terror.ClassOptimizer.New(mysql.ErrPrivilegeCheckFail, mysql.MySQLErrName[mysql.ErrPrivilegeCheckFail]) ErrInvalidWildCard = terror.ClassOptimizer.New(mysql.ErrInvalidWildCard, mysql.MySQLErrName[mysql.ErrInvalidWildCard]) ErrMixOfGroupFuncAndFields = terror.ClassOptimizer.New(mysql.ErrMixOfGroupFuncAndFieldsIncompatible, mysql.MySQLErrName[mysql.ErrMixOfGroupFuncAndFieldsIncompatible]) ErrDBaccessDenied = terror.ClassOptimizer.New(mysql.ErrDBaccessDenied, mysql.MySQLErrName[mysql.ErrDBaccessDenied]) ErrTableaccessDenied = terror.ClassOptimizer.New(mysql.ErrTableaccessDenied, mysql.MySQLErrName[mysql.ErrTableaccessDenied]) ErrSpecificAccessDenied = terror.ClassOptimizer.New(mysql.ErrSpecificAccessDenied, mysql.MySQLErrName[mysql.ErrSpecificAccessDenied]) ErrViewNoExplain = terror.ClassOptimizer.New(mysql.ErrViewNoExplain, mysql.MySQLErrName[mysql.ErrViewNoExplain]) ErrWrongValueCountOnRow = terror.ClassOptimizer.New(mysql.ErrWrongValueCountOnRow, mysql.MySQLErrName[mysql.ErrWrongValueCountOnRow]) ErrViewInvalid = terror.ClassOptimizer.New(mysql.ErrViewInvalid, mysql.MySQLErrName[mysql.ErrViewInvalid]) ErrNoSuchThread = terror.ClassOptimizer.New(mysql.ErrNoSuchThread, mysql.MySQLErrName[mysql.ErrNoSuchThread]) ErrUnknownColumn = terror.ClassOptimizer.New(mysql.ErrBadField, mysql.MySQLErrName[mysql.ErrBadField]) ErrCartesianProductUnsupported = terror.ClassOptimizer.New(mysql.ErrCartesianProductUnsupported, mysql.MySQLErrName[mysql.ErrCartesianProductUnsupported]) ErrStmtNotFound = terror.ClassOptimizer.New(mysql.ErrPreparedStmtNotFound, mysql.MySQLErrName[mysql.ErrPreparedStmtNotFound]) ErrAmbiguous = terror.ClassOptimizer.New(mysql.ErrNonUniq, mysql.MySQLErrName[mysql.ErrNonUniq]) // Since we cannot know if user loggined with a password, use message of ErrAccessDeniedNoPassword instead ErrAccessDenied = terror.ClassOptimizer.New(mysql.ErrAccessDenied, mysql.MySQLErrName[mysql.ErrAccessDeniedNoPassword]) )
error definitions.
Functions ¶
This section is empty.
Types ¶
type AggregateFuncExtractor ¶
type AggregateFuncExtractor struct { // AggFuncs is the collected AggregateFuncExprs. AggFuncs []*ast.AggregateFuncExpr // contains filtered or unexported fields }
AggregateFuncExtractor visits Expr tree. It converts ColunmNameExpr to AggregateFuncExpr and collects AggregateFuncExpr.
type BatchPointGetPlan ¶
type BatchPointGetPlan struct { Table table.Table IndexMeta *model.IndexMeta IndexValues [][]types.Datum Delete bool // contains filtered or unexported fields }
func (BatchPointGetPlan) Init ¶
func (p BatchPointGetPlan) Init(ctx sctx.Context, schema *expression.Schema, names []*types.FieldName) *BatchPointGetPlan
func (*BatchPointGetPlan) OutputNames ¶
OutputNames returns the outputting names of each column.
func (*BatchPointGetPlan) Schema ¶
func (s *BatchPointGetPlan) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*BatchPointGetPlan) SetOutputNames ¶
func (*BatchPointGetPlan) SetSchema ¶
func (s *BatchPointGetPlan) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type ByItems ¶
type ByItems struct { Expr expression.Expression Desc bool }
ByItems wraps a "by" item.
type DDL ¶
func (*DDL) OutputNames ¶
OutputNames returns the outputting names of each column.
func (*DDL) Schema ¶
func (s *DDL) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*DDL) SetOutputNames ¶
func (*DDL) SetSchema ¶
func (s *DDL) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type DataSource ¶
type DataSource struct { Columns []*model.ColumnMeta DBName parser_model.CIStr TableAsName *parser_model.CIStr TblCols []*expression.Column IdxVals []types.Datum Index *model.IndexMeta PkVals []types.Datum Limit uint64 SimpleScanPlan *SimpleScanPlan // contains filtered or unexported fields }
DataSource represents a tableScan without condition push down.
func (DataSource) Init ¶
func (d DataSource) Init(ctx sctx.Context) *DataSource
func (*DataSource) OutputNames ¶
func (*DataSource) PruneColumns ¶
func (d *DataSource) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
func (*DataSource) PushFilterDown ¶
func (d *DataSource) PushFilterDown(exprs []expression.Expression) []expression.Expression
func (*DataSource) PushFilterDown2 ¶
func (d *DataSource) PushFilterDown2(exprs []expression.Expression) []expression.Expression
func (*DataSource) PushLimitDown ¶
func (d *DataSource) PushLimitDown(limit uint64)
func (*DataSource) Schema ¶
func (s *DataSource) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*DataSource) SetOutputNames ¶
func (*DataSource) SetSchema ¶
func (s *DataSource) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
func (*DataSource) Table ¶
func (d *DataSource) Table() table.Table
type Delete ¶
type Delete struct { Table table.Table SelectionPlan Plan SimplePointGetPlan Plan // contains filtered or unexported fields }
func (*Delete) OutputNames ¶
OutputNames returns the outputting names of each column.
func (*Delete) Schema ¶
func (s *Delete) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*Delete) SetOutputNames ¶
func (*Delete) SetSchema ¶
func (s *Delete) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type Insert ¶
type Insert struct { Table table.Table Columns []*ast.ColumnName Lists [][]expression.Expression DefaultCF bool // contains filtered or unexported fields }
func (*Insert) OutputNames ¶
OutputNames returns the outputting names of each column.
func (*Insert) Schema ¶
func (s *Insert) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*Insert) SetOutputNames ¶
func (*Insert) SetSchema ¶
func (s *Insert) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type LogicalAggregation ¶
type LogicalAggregation struct { AggFuncs []*aggregation.AggFuncDesc Table table.Table // contains filtered or unexported fields }
func (*LogicalAggregation) GetUsedCols ¶
func (la *LogicalAggregation) GetUsedCols() (usedCols []*expression.Column)
GetUsedCols extracts all of the Columns used by agg including GroupByItems and AggFuncs.
func (LogicalAggregation) Init ¶
func (la LogicalAggregation) Init(ctx sctx.Context) *LogicalAggregation
func (*LogicalAggregation) OutputNames ¶
func (*LogicalAggregation) PushLimitDown ¶
func (p *LogicalAggregation) PushLimitDown(limit uint64)
func (*LogicalAggregation) Schema ¶
func (s *LogicalAggregation) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*LogicalAggregation) SetOutputNames ¶
func (*LogicalAggregation) SetSchema ¶
func (s *LogicalAggregation) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type LogicalLimit ¶
LogicalLimit represents offset and limit plan.
func (*LogicalLimit) Children ¶
func (blp *LogicalLimit) Children() []LogicalPlan
func (LogicalLimit) Init ¶
func (p LogicalLimit) Init(ctx sctx.Context) *LogicalLimit
Init initializes LogicalLimit.
func (*LogicalLimit) OutputNames ¶
func (p *LogicalLimit) OutputNames() types.NameSlice
func (*LogicalLimit) PruneColumns ¶
func (blp *LogicalLimit) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
func (*LogicalLimit) PushFilterDown ¶
func (blp *LogicalLimit) PushFilterDown(exprs []expression.Expression) []expression.Expression
func (*LogicalLimit) PushLimitDown ¶
func (blp *LogicalLimit) PushLimitDown(limit uint64)
func (*LogicalLimit) Schema ¶
func (p *LogicalLimit) Schema() *expression.Schema
func (*LogicalLimit) SetChild ¶
func (blp *LogicalLimit) SetChild(i int, child LogicalPlan)
func (*LogicalLimit) SetChildren ¶
func (blp *LogicalLimit) SetChildren(children ...LogicalPlan)
type LogicalPlan ¶
type LogicalPlan interface { Plan // Get all the children. Children() []LogicalPlan // SetChildren sets the children for the plan. SetChildren(...LogicalPlan) // SetChild sets the ith child for the plan. SetChild(i int, child LogicalPlan) // PruneColumns prunes the unused columns. PruneColumns([]*expression.Column) ([]*expression.Column, error) // Push the expression in where clause to datasource to use index. // Only selection need to implement this now. PushFilterDown([]expression.Expression) []expression.Expression PushLimitDown(uint64) }
type LogicalProjection ¶
type LogicalProjection struct { Exprs []expression.Expression // key -> col index in proj schema // value -> col index in row fetched(table scan schema) ColIndexMap map[int]int // contains filtered or unexported fields }
func (LogicalProjection) Init ¶
func (p LogicalProjection) Init(ctx sctx.Context) *LogicalProjection
func (*LogicalProjection) OutputNames ¶
func (*LogicalProjection) PruneColumns ¶
func (p *LogicalProjection) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
func (*LogicalProjection) Schema ¶
func (s *LogicalProjection) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*LogicalProjection) SetOutputNames ¶
func (*LogicalProjection) SetSchema ¶
func (s *LogicalProjection) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type LogicalSelection ¶
type LogicalSelection struct { // Originally the WHERE or ON condition is parsed into a single expression, // but after we converted to CNF(Conjunctive normal form), it can be // split into a list of AND conditions. Conditions []expression.Expression // contains filtered or unexported fields }
LogicalSelection represents a where or having predicate.
func (*LogicalSelection) Children ¶
func (blp *LogicalSelection) Children() []LogicalPlan
func (LogicalSelection) Init ¶
func (p LogicalSelection) Init(ctx sctx.Context) *LogicalSelection
Init initializes LogicalSelection.
func (*LogicalSelection) OutputNames ¶
func (p *LogicalSelection) OutputNames() types.NameSlice
func (*LogicalSelection) PruneColumns ¶
func (p *LogicalSelection) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
TODO: Should prune columns based on cols related in where condition.
func (*LogicalSelection) PushFilterDown ¶
func (p *LogicalSelection) PushFilterDown(exprs []expression.Expression) []expression.Expression
func (*LogicalSelection) PushLimitDown ¶
func (blp *LogicalSelection) PushLimitDown(limit uint64)
func (*LogicalSelection) Schema ¶
func (p *LogicalSelection) Schema() *expression.Schema
func (*LogicalSelection) SetChild ¶
func (blp *LogicalSelection) SetChild(i int, child LogicalPlan)
func (*LogicalSelection) SetChildren ¶
func (blp *LogicalSelection) SetChildren(children ...LogicalPlan)
type LogicalShow ¶
type LogicalShow struct { ShowContents // contains filtered or unexported fields }
LogicalShow represents a show plan.
func (LogicalShow) Init ¶
func (p LogicalShow) Init(ctx sctx.Context) *LogicalShow
Init initializes LogicalSelection.
func (*LogicalShow) OutputNames ¶
func (*LogicalShow) Schema ¶
func (s *LogicalShow) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*LogicalShow) SetOutputNames ¶
func (*LogicalShow) SetSchema ¶
func (s *LogicalShow) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type LogicalSort ¶
type LogicalSort struct { ByItems []*ByItems // contains filtered or unexported fields }
func (*LogicalSort) Children ¶
func (blp *LogicalSort) Children() []LogicalPlan
func (LogicalSort) Init ¶
func (p LogicalSort) Init(ctx sctx.Context) *LogicalSort
func (*LogicalSort) OutputNames ¶
func (p *LogicalSort) OutputNames() types.NameSlice
func (*LogicalSort) PruneColumns ¶
func (blp *LogicalSort) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
func (*LogicalSort) PushFilterDown ¶
func (blp *LogicalSort) PushFilterDown(exprs []expression.Expression) []expression.Expression
func (*LogicalSort) PushLimitDown ¶
func (p *LogicalSort) PushLimitDown(limit uint64)
Sort can not push limit down unless the by item has an index. Ignore the situation for now.
func (*LogicalSort) Schema ¶
func (p *LogicalSort) Schema() *expression.Schema
func (*LogicalSort) SetChild ¶
func (blp *LogicalSort) SetChild(i int, child LogicalPlan)
func (*LogicalSort) SetChildren ¶
func (blp *LogicalSort) SetChildren(children ...LogicalPlan)
type LogicalTableDual ¶
type LogicalTableDual struct { RowCount int // contains filtered or unexported fields }
LogicalTableDual represents a dual table plan.
func (LogicalTableDual) Init ¶
func (p LogicalTableDual) Init(ctx sctx.Context) *LogicalTableDual
Init initializes LogicalTableDual.
func (*LogicalTableDual) OutputNames ¶
func (*LogicalTableDual) Schema ¶
func (s *LogicalTableDual) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*LogicalTableDual) SetOutputNames ¶
func (*LogicalTableDual) SetSchema ¶
func (s *LogicalTableDual) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type LogicalUpdate ¶
type LogicalUpdate struct { Table table.Table ColValues map[int64]types.Datum DataSource Plan // contains filtered or unexported fields }
func (*LogicalUpdate) Children ¶
func (blp *LogicalUpdate) Children() []LogicalPlan
func (LogicalUpdate) Init ¶
func (p LogicalUpdate) Init(ctx sctx.Context) *LogicalUpdate
func (*LogicalUpdate) PruneColumns ¶
func (blp *LogicalUpdate) PruneColumns(usedColumns []*expression.Column) ([]*expression.Column, error)
func (*LogicalUpdate) PushFilterDown ¶
func (blp *LogicalUpdate) PushFilterDown(exprs []expression.Expression) []expression.Expression
func (*LogicalUpdate) PushLimitDown ¶
func (blp *LogicalUpdate) PushLimitDown(limit uint64)
func (*LogicalUpdate) SetChild ¶
func (blp *LogicalUpdate) SetChild(i int, child LogicalPlan)
func (*LogicalUpdate) SetChildren ¶
func (blp *LogicalUpdate) SetChildren(children ...LogicalPlan)
type PhysicalPlan ¶
type PhysicalPlan interface { Plan // Get all the children. Children() []PhysicalPlan // SetChildren sets the children for the plan. SetChildren(...PhysicalPlan) // SetChild sets the ith child for the plan. SetChild(i int, child PhysicalPlan) }
type Plan ¶
type PlanBuilder ¶
type PlanBuilder struct {
// contains filtered or unexported fields
}
func NewPlanBuilder ¶
func NewPlanBuilder(ctx sctx.Context, is infoschema.InfoSchema) *PlanBuilder
type Set ¶
type Set struct { VarAssigns []*expression.VarAssignment // contains filtered or unexported fields }
func (*Set) OutputNames ¶
OutputNames returns the outputting names of each column.
func (*Set) Schema ¶
func (s *Set) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*Set) SetOutputNames ¶
func (*Set) SetSchema ¶
func (s *Set) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type ShowContents ¶
type ShowContents struct { Tp ast.ShowStmtType // Databases/Tables/Columns/.... DBName string Table *ast.TableName // Used for showing columns. Column *ast.ColumnName // Used for `desc table column`. IndexName parser_model.CIStr }
ShowContents stores the contents for the `SHOW` statement.
type Simple ¶
Simple represents a simple statement plan which doesn't need any optimization.
func (*Simple) OutputNames ¶
OutputNames returns the outputting names of each column.
func (*Simple) Schema ¶
func (s *Simple) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*Simple) SetOutputNames ¶
func (*Simple) SetSchema ¶
func (s *Simple) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type SimpleScanPlan ¶
type SimpleScanPlan struct { Table table.Table IndexMeta *model.IndexMeta Lower []*util.Bound Upper []*util.Bound Limit int64 // contains filtered or unexported fields }
func (SimpleScanPlan) Init ¶
func (p SimpleScanPlan) Init(ctx sctx.Context, schema *expression.Schema, names []*types.FieldName) *SimpleScanPlan
func (*SimpleScanPlan) OutputNames ¶
OutputNames returns the outputting names of each column.
func (*SimpleScanPlan) Schema ¶
func (s *SimpleScanPlan) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*SimpleScanPlan) SetOutputNames ¶
func (*SimpleScanPlan) SetSchema ¶
func (s *SimpleScanPlan) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.
type SplitRegion ¶
type SplitRegion struct { IndexMeta *model.IndexMeta TableMeta *model.TableMeta Lower []types.Datum Upper []types.Datum ValueLists [][]types.Datum Num int // contains filtered or unexported fields }
func (*SplitRegion) OutputNames ¶
OutputNames returns the outputting names of each column.
func (*SplitRegion) Schema ¶
func (s *SplitRegion) Schema() *expression.Schema
Schema implements the Plan.Schema interface.
func (*SplitRegion) SetOutputNames ¶
func (*SplitRegion) SetSchema ¶
func (s *SplitRegion) SetSchema(schema *expression.Schema)
SetSchema implements the Plan.SetSchema interface.