Documentation ¶
Index ¶
- Constants
- Variables
- func Cacheable(node ast.Node) bool
- func InsertPlan(parent Plan, child Plan, insert Plan) error
- func MockResolveName(node ast.Node, info infoschema.InfoSchema, defaultSchema string, ...) error
- func PrepareStmt(is infoschema.InfoSchema, ctx context.Context, node ast.Node) error
- func Preprocess(node ast.Node, info infoschema.InfoSchema, ctx context.Context) error
- func RemovePlan(p Plan) error
- func ResolveName(node ast.Node, info infoschema.InfoSchema, ctx context.Context) error
- func ToString(p Plan) string
- func UseDAGPlanBuilder(ctx context.Context) bool
- func Validate(node ast.Node, inPrepare bool) error
- type AggregateFuncExtractor
- type AggregationType
- type Analyze
- func (p *Analyze) AddChild(child Plan)
- func (p *Analyze) AddParent(parent Plan)
- func (p *Analyze) Allocator() *idAllocator
- func (p *Analyze) Children() []Plan
- func (p *Analyze) ExplainID() string
- func (p *Analyze) ID() int
- func (p *Analyze) MarshalJSON() ([]byte, error)
- func (p *Analyze) Parents() []Plan
- func (p *Analyze) PruneColumns(parentUsedCols []*expression.Column)
- func (p *Analyze) ReplaceChild(child, newChild Plan) error
- func (p *Analyze) ReplaceParent(parent, newPar Plan) error
- func (p *Analyze) ResolveIndices()
- func (p *Analyze) Schema() *expression.Schema
- func (p *Analyze) SetChildren(children ...Plan)
- func (p *Analyze) SetParents(pars ...Plan)
- func (p *Analyze) SetSchema(schema *expression.Schema)
- type AnalyzeColumnsTask
- type AnalyzeIndexTask
- type ByItems
- type Cache
- func (p Cache) AddChild(child Plan)
- func (p Cache) AddParent(parent Plan)
- func (p Cache) Allocator() *idAllocator
- func (p Cache) Children() []Plan
- func (p *Cache) Copy() PhysicalPlan
- func (p Cache) ExplainID() string
- func (bp *Cache) ExplainInfo() string
- func (p Cache) ID() int
- func (p Cache) MarshalJSON() ([]byte, error)
- func (p Cache) Parents() []Plan
- func (p Cache) ReplaceChild(child, newChild Plan) error
- func (p Cache) ReplaceParent(parent, newPar Plan) error
- func (p Cache) ResolveIndices()
- func (p Cache) Schema() *expression.Schema
- func (p Cache) SetChildren(children ...Plan)
- func (p Cache) SetParents(pars ...Plan)
- func (p Cache) SetSchema(schema *expression.Schema)
- func (p *Cache) ToPB(_ context.Context) (*tipb.Executor, error)
- type CancelDDLJobs
- func (p *CancelDDLJobs) AddChild(child Plan)
- func (p *CancelDDLJobs) AddParent(parent Plan)
- func (p *CancelDDLJobs) Allocator() *idAllocator
- func (p *CancelDDLJobs) Children() []Plan
- func (p *CancelDDLJobs) ExplainID() string
- func (p *CancelDDLJobs) ID() int
- func (p *CancelDDLJobs) MarshalJSON() ([]byte, error)
- func (p *CancelDDLJobs) Parents() []Plan
- func (p *CancelDDLJobs) ReplaceChild(child, newChild Plan) error
- func (p *CancelDDLJobs) ReplaceParent(parent, newPar Plan) error
- func (p *CancelDDLJobs) ResolveIndices()
- func (p *CancelDDLJobs) Schema() *expression.Schema
- func (p *CancelDDLJobs) SetChildren(children ...Plan)
- func (p *CancelDDLJobs) SetParents(pars ...Plan)
- func (p *CancelDDLJobs) SetSchema(schema *expression.Schema)
- type CheckTable
- func (p *CheckTable) AddChild(child Plan)
- func (p *CheckTable) AddParent(parent Plan)
- func (p *CheckTable) Allocator() *idAllocator
- func (p *CheckTable) Children() []Plan
- func (p *CheckTable) ExplainID() string
- func (p *CheckTable) ID() int
- func (p *CheckTable) MarshalJSON() ([]byte, error)
- func (p *CheckTable) Parents() []Plan
- func (p *CheckTable) ReplaceChild(child, newChild Plan) error
- func (p *CheckTable) ReplaceParent(parent, newPar Plan) error
- func (p *CheckTable) ResolveIndices()
- func (p *CheckTable) Schema() *expression.Schema
- func (p *CheckTable) SetChildren(children ...Plan)
- func (p *CheckTable) SetParents(pars ...Plan)
- func (p *CheckTable) SetSchema(schema *expression.Schema)
- type DDL
- func (p *DDL) AddChild(child Plan)
- func (p *DDL) AddParent(parent Plan)
- func (p *DDL) Allocator() *idAllocator
- func (p *DDL) Children() []Plan
- func (p *DDL) ExplainID() string
- func (p *DDL) ID() int
- func (p *DDL) MarshalJSON() ([]byte, error)
- func (p *DDL) Parents() []Plan
- func (p *DDL) ReplaceChild(child, newChild Plan) error
- func (p *DDL) ReplaceParent(parent, newPar Plan) error
- func (p *DDL) ResolveIndices()
- func (p *DDL) Schema() *expression.Schema
- func (p *DDL) SetChildren(children ...Plan)
- func (p *DDL) SetParents(pars ...Plan)
- func (p *DDL) SetSchema(schema *expression.Schema)
- type DataSource
- func (p DataSource) AddChild(child Plan)
- func (p DataSource) AddParent(parent Plan)
- func (p DataSource) Allocator() *idAllocator
- func (p DataSource) Children() []Plan
- func (p DataSource) ExplainID() string
- func (p DataSource) ID() int
- func (p DataSource) MarshalJSON() ([]byte, error)
- func (p DataSource) Parents() []Plan
- func (p *DataSource) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *DataSource) PruneColumns(parentUsedCols []*expression.Column)
- func (p DataSource) ReplaceChild(child, newChild Plan) error
- func (p DataSource) ReplaceParent(parent, newPar Plan) error
- func (p DataSource) ResolveIndices()
- func (p *DataSource) Schema() *expression.Schema
- func (p DataSource) SetChildren(children ...Plan)
- func (p DataSource) SetParents(pars ...Plan)
- func (p DataSource) SetSchema(schema *expression.Schema)
- func (p *DataSource) TableInfo() *model.TableInfo
- type Deallocate
- func (p *Deallocate) AddChild(child Plan)
- func (p *Deallocate) AddParent(parent Plan)
- func (p *Deallocate) Allocator() *idAllocator
- func (p *Deallocate) Children() []Plan
- func (p *Deallocate) ExplainID() string
- func (p *Deallocate) ID() int
- func (p *Deallocate) MarshalJSON() ([]byte, error)
- func (p *Deallocate) Parents() []Plan
- func (p *Deallocate) ReplaceChild(child, newChild Plan) error
- func (p *Deallocate) ReplaceParent(parent, newPar Plan) error
- func (p *Deallocate) ResolveIndices()
- func (p *Deallocate) Schema() *expression.Schema
- func (p *Deallocate) SetChildren(children ...Plan)
- func (p *Deallocate) SetParents(pars ...Plan)
- func (p *Deallocate) SetSchema(schema *expression.Schema)
- type Delete
- func (p Delete) AddChild(child Plan)
- func (p Delete) AddParent(parent Plan)
- func (p Delete) Allocator() *idAllocator
- func (p Delete) Children() []Plan
- func (p *Delete) Copy() PhysicalPlan
- func (p Delete) ExplainID() string
- func (bp *Delete) ExplainInfo() string
- func (p Delete) ID() int
- func (p Delete) MarshalJSON() ([]byte, error)
- func (p Delete) Parents() []Plan
- func (p *Delete) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *Delete) PruneColumns(parentUsedCols []*expression.Column)
- func (p Delete) ReplaceChild(child, newChild Plan) error
- func (p Delete) ReplaceParent(parent, newPar Plan) error
- func (p Delete) ResolveIndices()
- func (p Delete) Schema() *expression.Schema
- func (p Delete) SetChildren(children ...Plan)
- func (p Delete) SetParents(pars ...Plan)
- func (p Delete) SetSchema(schema *expression.Schema)
- func (p *Delete) ToPB(_ context.Context) (*tipb.Executor, error)
- type Execute
- func (p *Execute) AddChild(child Plan)
- func (p *Execute) AddParent(parent Plan)
- func (p *Execute) Allocator() *idAllocator
- func (p *Execute) Children() []Plan
- func (p *Execute) ExplainID() string
- func (p *Execute) ID() int
- func (p *Execute) MarshalJSON() ([]byte, error)
- func (p *Execute) Parents() []Plan
- func (p *Execute) ReplaceChild(child, newChild Plan) error
- func (p *Execute) ReplaceParent(parent, newPar Plan) error
- func (p *Execute) ResolveIndices()
- func (p *Execute) Schema() *expression.Schema
- func (p *Execute) SetChildren(children ...Plan)
- func (p *Execute) SetParents(pars ...Plan)
- func (p *Execute) SetSchema(schema *expression.Schema)
- type Exists
- func (p Exists) AddChild(child Plan)
- func (p Exists) AddParent(parent Plan)
- func (p Exists) Allocator() *idAllocator
- func (p Exists) Children() []Plan
- func (p *Exists) Copy() PhysicalPlan
- func (p Exists) ExplainID() string
- func (bp *Exists) ExplainInfo() string
- func (p Exists) ID() int
- func (p Exists) MarshalJSON() ([]byte, error)
- func (p Exists) Parents() []Plan
- func (p *Exists) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *Exists) PruneColumns(parentUsedCols []*expression.Column)
- func (p Exists) ReplaceChild(child, newChild Plan) error
- func (p Exists) ReplaceParent(parent, newPar Plan) error
- func (p Exists) ResolveIndices()
- func (p Exists) Schema() *expression.Schema
- func (p Exists) SetChildren(children ...Plan)
- func (p Exists) SetParents(pars ...Plan)
- func (p Exists) SetSchema(schema *expression.Schema)
- func (p *Exists) ToPB(_ context.Context) (*tipb.Executor, error)
- type Explain
- func (p *Explain) AddChild(child Plan)
- func (p *Explain) AddParent(parent Plan)
- func (p *Explain) Allocator() *idAllocator
- func (p *Explain) Children() []Plan
- func (p *Explain) ExplainID() string
- func (p *Explain) ID() int
- func (p *Explain) MarshalJSON() ([]byte, error)
- func (p *Explain) Parents() []Plan
- func (p *Explain) ReplaceChild(child, newChild Plan) error
- func (p *Explain) ReplaceParent(parent, newPar Plan) error
- func (p *Explain) ResolveIndices()
- func (p *Explain) Schema() *expression.Schema
- func (p *Explain) SetChildren(children ...Plan)
- func (p *Explain) SetParents(pars ...Plan)
- func (p *Explain) SetSchema(schema *expression.Schema)
- type Insert
- func (p Insert) AddChild(child Plan)
- func (p Insert) AddParent(parent Plan)
- func (p Insert) Allocator() *idAllocator
- func (p Insert) Children() []Plan
- func (p *Insert) Copy() PhysicalPlan
- func (p Insert) ExplainID() string
- func (bp *Insert) ExplainInfo() string
- func (p Insert) ID() int
- func (p Insert) MarshalJSON() ([]byte, error)
- func (p Insert) Parents() []Plan
- func (p *Insert) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *Insert) PruneColumns(_ []*expression.Column)
- func (p Insert) ReplaceChild(child, newChild Plan) error
- func (p Insert) ReplaceParent(parent, newPar Plan) error
- func (p *Insert) ResolveIndices()
- func (p Insert) Schema() *expression.Schema
- func (p Insert) SetChildren(children ...Plan)
- func (p Insert) SetParents(pars ...Plan)
- func (p Insert) SetSchema(schema *expression.Schema)
- func (p *Insert) ToPB(_ context.Context) (*tipb.Executor, error)
- type InsertGeneratedColumns
- type JoinType
- type Limit
- func (p Limit) AddChild(child Plan)
- func (p Limit) AddParent(parent Plan)
- func (p Limit) Allocator() *idAllocator
- func (p Limit) Children() []Plan
- func (p *Limit) Copy() PhysicalPlan
- func (p Limit) ExplainID() string
- func (p *Limit) ExplainInfo() string
- func (p Limit) ID() int
- func (p *Limit) MarshalJSON() ([]byte, error)
- func (p Limit) Parents() []Plan
- func (p *Limit) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *Limit) PruneColumns(parentUsedCols []*expression.Column)
- func (p Limit) ReplaceChild(child, newChild Plan) error
- func (p Limit) ReplaceParent(parent, newPar Plan) error
- func (p Limit) ResolveIndices()
- func (p Limit) Schema() *expression.Schema
- func (p Limit) SetChildren(children ...Plan)
- func (p Limit) SetParents(pars ...Plan)
- func (p Limit) SetSchema(schema *expression.Schema)
- func (p *Limit) ToPB(ctx context.Context) (*tipb.Executor, error)
- type LoadData
- func (p *LoadData) AddChild(child Plan)
- func (p *LoadData) AddParent(parent Plan)
- func (p *LoadData) Allocator() *idAllocator
- func (p *LoadData) Children() []Plan
- func (p *LoadData) ExplainID() string
- func (p *LoadData) ID() int
- func (p *LoadData) MarshalJSON() ([]byte, error)
- func (p *LoadData) Parents() []Plan
- func (p *LoadData) ReplaceChild(child, newChild Plan) error
- func (p *LoadData) ReplaceParent(parent, newPar Plan) error
- func (p *LoadData) ResolveIndices()
- func (p *LoadData) Schema() *expression.Schema
- func (p *LoadData) SetChildren(children ...Plan)
- func (p *LoadData) SetParents(pars ...Plan)
- func (p *LoadData) SetSchema(schema *expression.Schema)
- type LogicalAggregation
- func (p LogicalAggregation) AddChild(child Plan)
- func (p LogicalAggregation) AddParent(parent Plan)
- func (p LogicalAggregation) Allocator() *idAllocator
- func (p LogicalAggregation) Children() []Plan
- func (p LogicalAggregation) ExplainID() string
- func (p LogicalAggregation) ID() int
- func (p LogicalAggregation) MarshalJSON() ([]byte, error)
- func (p LogicalAggregation) Parents() []Plan
- func (p *LogicalAggregation) PredicatePushDown(predicates []expression.Expression) (ret []expression.Expression, retPlan LogicalPlan, err error)
- func (p *LogicalAggregation) PruneColumns(parentUsedCols []*expression.Column)
- func (p LogicalAggregation) ReplaceChild(child, newChild Plan) error
- func (p LogicalAggregation) ReplaceParent(parent, newPar Plan) error
- func (p *LogicalAggregation) ResolveIndices()
- func (p LogicalAggregation) Schema() *expression.Schema
- func (p LogicalAggregation) SetChildren(children ...Plan)
- func (p LogicalAggregation) SetParents(pars ...Plan)
- func (p LogicalAggregation) SetSchema(schema *expression.Schema)
- type LogicalApply
- func (p LogicalApply) AddChild(child Plan)
- func (p LogicalApply) AddParent(parent Plan)
- func (p LogicalApply) Allocator() *idAllocator
- func (p LogicalApply) Children() []Plan
- func (p LogicalApply) ExplainID() string
- func (p LogicalApply) ID() int
- func (p LogicalApply) MarshalJSON() ([]byte, error)
- func (p LogicalApply) Parents() []Plan
- func (p *LogicalApply) PruneColumns(parentUsedCols []*expression.Column)
- func (p LogicalApply) ReplaceChild(child, newChild Plan) error
- func (p LogicalApply) ReplaceParent(parent, newPar Plan) error
- func (p *LogicalApply) ResolveIndices()
- func (p LogicalApply) Schema() *expression.Schema
- func (p LogicalApply) SetChildren(children ...Plan)
- func (p LogicalApply) SetParents(pars ...Plan)
- func (p LogicalApply) SetSchema(schema *expression.Schema)
- type LogicalJoin
- func (p LogicalJoin) AddChild(child Plan)
- func (p LogicalJoin) AddParent(parent Plan)
- func (p LogicalJoin) Allocator() *idAllocator
- func (p LogicalJoin) Children() []Plan
- func (p LogicalJoin) ExplainID() string
- func (p LogicalJoin) ID() int
- func (p LogicalJoin) MarshalJSON() ([]byte, error)
- func (p LogicalJoin) Parents() []Plan
- func (p *LogicalJoin) PredicatePushDown(predicates []expression.Expression) (ret []expression.Expression, retPlan LogicalPlan, err error)
- func (p *LogicalJoin) PruneColumns(parentUsedCols []*expression.Column)
- func (p LogicalJoin) ReplaceChild(child, newChild Plan) error
- func (p LogicalJoin) ReplaceParent(parent, newPar Plan) error
- func (p *LogicalJoin) ResolveIndices()
- func (p LogicalJoin) Schema() *expression.Schema
- func (p LogicalJoin) SetChildren(children ...Plan)
- func (p LogicalJoin) SetParents(pars ...Plan)
- func (p LogicalJoin) SetSchema(schema *expression.Schema)
- type LogicalPlan
- type MaxOneRow
- func (p MaxOneRow) AddChild(child Plan)
- func (p MaxOneRow) AddParent(parent Plan)
- func (p MaxOneRow) Allocator() *idAllocator
- func (p MaxOneRow) Children() []Plan
- func (p *MaxOneRow) Copy() PhysicalPlan
- func (p MaxOneRow) ExplainID() string
- func (bp *MaxOneRow) ExplainInfo() string
- func (p MaxOneRow) ID() int
- func (p MaxOneRow) MarshalJSON() ([]byte, error)
- func (p MaxOneRow) Parents() []Plan
- func (p *MaxOneRow) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *MaxOneRow) PruneColumns(parentUsedCols []*expression.Column)
- func (p MaxOneRow) ReplaceChild(child, newChild Plan) error
- func (p MaxOneRow) ReplaceParent(parent, newPar Plan) error
- func (p MaxOneRow) ResolveIndices()
- func (p MaxOneRow) Schema() *expression.Schema
- func (p MaxOneRow) SetChildren(children ...Plan)
- func (p MaxOneRow) SetParents(pars ...Plan)
- func (p MaxOneRow) SetSchema(schema *expression.Schema)
- func (p *MaxOneRow) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalAggregation
- func (p PhysicalAggregation) AddChild(child Plan)
- func (p PhysicalAggregation) AddParent(parent Plan)
- func (p PhysicalAggregation) Allocator() *idAllocator
- func (p PhysicalAggregation) Children() []Plan
- func (p *PhysicalAggregation) Copy() PhysicalPlan
- func (p PhysicalAggregation) ExplainID() string
- func (p *PhysicalAggregation) ExplainInfo() string
- func (p PhysicalAggregation) ID() int
- func (p *PhysicalAggregation) MarshalJSON() ([]byte, error)
- func (p PhysicalAggregation) Parents() []Plan
- func (p PhysicalAggregation) ReplaceChild(child, newChild Plan) error
- func (p PhysicalAggregation) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalAggregation) ResolveIndices()
- func (p PhysicalAggregation) Schema() *expression.Schema
- func (p PhysicalAggregation) SetChildren(children ...Plan)
- func (p PhysicalAggregation) SetParents(pars ...Plan)
- func (p PhysicalAggregation) SetSchema(schema *expression.Schema)
- func (p *PhysicalAggregation) ToPB(ctx context.Context) (*tipb.Executor, error)
- type PhysicalApply
- func (p PhysicalApply) AddChild(child Plan)
- func (p PhysicalApply) AddParent(parent Plan)
- func (p PhysicalApply) Allocator() *idAllocator
- func (p PhysicalApply) Children() []Plan
- func (p *PhysicalApply) Copy() PhysicalPlan
- func (p PhysicalApply) ExplainID() string
- func (p *PhysicalApply) ExplainInfo() string
- func (p PhysicalApply) ID() int
- func (p *PhysicalApply) MarshalJSON() ([]byte, error)
- func (p PhysicalApply) Parents() []Plan
- func (p PhysicalApply) ReplaceChild(child, newChild Plan) error
- func (p PhysicalApply) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalApply) ResolveIndices()
- func (p PhysicalApply) Schema() *expression.Schema
- func (p PhysicalApply) SetChildren(children ...Plan)
- func (p PhysicalApply) SetParents(pars ...Plan)
- func (p PhysicalApply) SetSchema(schema *expression.Schema)
- func (p *PhysicalApply) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalHashJoin
- func (p PhysicalHashJoin) AddChild(child Plan)
- func (p PhysicalHashJoin) AddParent(parent Plan)
- func (p PhysicalHashJoin) Allocator() *idAllocator
- func (p PhysicalHashJoin) Children() []Plan
- func (p *PhysicalHashJoin) Copy() PhysicalPlan
- func (p PhysicalHashJoin) ExplainID() string
- func (p *PhysicalHashJoin) ExplainInfo() string
- func (p PhysicalHashJoin) ID() int
- func (p *PhysicalHashJoin) MarshalJSON() ([]byte, error)
- func (p PhysicalHashJoin) Parents() []Plan
- func (p PhysicalHashJoin) ReplaceChild(child, newChild Plan) error
- func (p PhysicalHashJoin) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalHashJoin) ResolveIndices()
- func (p PhysicalHashJoin) Schema() *expression.Schema
- func (p PhysicalHashJoin) SetChildren(children ...Plan)
- func (p PhysicalHashJoin) SetParents(pars ...Plan)
- func (p PhysicalHashJoin) SetSchema(schema *expression.Schema)
- func (p *PhysicalHashJoin) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalHashSemiJoin
- func (p PhysicalHashSemiJoin) AddChild(child Plan)
- func (p PhysicalHashSemiJoin) AddParent(parent Plan)
- func (p PhysicalHashSemiJoin) Allocator() *idAllocator
- func (p PhysicalHashSemiJoin) Children() []Plan
- func (p *PhysicalHashSemiJoin) Copy() PhysicalPlan
- func (p PhysicalHashSemiJoin) ExplainID() string
- func (p *PhysicalHashSemiJoin) ExplainInfo() string
- func (p PhysicalHashSemiJoin) ID() int
- func (p *PhysicalHashSemiJoin) MarshalJSON() ([]byte, error)
- func (p PhysicalHashSemiJoin) Parents() []Plan
- func (p PhysicalHashSemiJoin) ReplaceChild(child, newChild Plan) error
- func (p PhysicalHashSemiJoin) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalHashSemiJoin) ResolveIndices()
- func (p PhysicalHashSemiJoin) Schema() *expression.Schema
- func (p PhysicalHashSemiJoin) SetChildren(children ...Plan)
- func (p PhysicalHashSemiJoin) SetParents(pars ...Plan)
- func (p PhysicalHashSemiJoin) SetSchema(schema *expression.Schema)
- func (p *PhysicalHashSemiJoin) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalIndexJoin
- func (p PhysicalIndexJoin) AddChild(child Plan)
- func (p PhysicalIndexJoin) AddParent(parent Plan)
- func (p PhysicalIndexJoin) Allocator() *idAllocator
- func (p PhysicalIndexJoin) Children() []Plan
- func (p *PhysicalIndexJoin) Copy() PhysicalPlan
- func (p PhysicalIndexJoin) ExplainID() string
- func (p *PhysicalIndexJoin) ExplainInfo() string
- func (p PhysicalIndexJoin) ID() int
- func (p PhysicalIndexJoin) MarshalJSON() ([]byte, error)
- func (p PhysicalIndexJoin) Parents() []Plan
- func (p PhysicalIndexJoin) ReplaceChild(child, newChild Plan) error
- func (p PhysicalIndexJoin) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalIndexJoin) ResolveIndices()
- func (p PhysicalIndexJoin) Schema() *expression.Schema
- func (p PhysicalIndexJoin) SetChildren(children ...Plan)
- func (p PhysicalIndexJoin) SetParents(pars ...Plan)
- func (p PhysicalIndexJoin) SetSchema(schema *expression.Schema)
- func (p *PhysicalIndexJoin) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalIndexLookUpReader
- func (p PhysicalIndexLookUpReader) AddChild(child Plan)
- func (p PhysicalIndexLookUpReader) AddParent(parent Plan)
- func (p PhysicalIndexLookUpReader) Allocator() *idAllocator
- func (p PhysicalIndexLookUpReader) Children() []Plan
- func (p *PhysicalIndexLookUpReader) Copy() PhysicalPlan
- func (p PhysicalIndexLookUpReader) ExplainID() string
- func (p *PhysicalIndexLookUpReader) ExplainInfo() string
- func (p PhysicalIndexLookUpReader) ID() int
- func (p PhysicalIndexLookUpReader) MarshalJSON() ([]byte, error)
- func (p PhysicalIndexLookUpReader) Parents() []Plan
- func (p PhysicalIndexLookUpReader) ReplaceChild(child, newChild Plan) error
- func (p PhysicalIndexLookUpReader) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalIndexLookUpReader) ResolveIndices()
- func (p PhysicalIndexLookUpReader) Schema() *expression.Schema
- func (p PhysicalIndexLookUpReader) SetChildren(children ...Plan)
- func (p PhysicalIndexLookUpReader) SetParents(pars ...Plan)
- func (p PhysicalIndexLookUpReader) SetSchema(schema *expression.Schema)
- func (p *PhysicalIndexLookUpReader) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalIndexReader
- func (p PhysicalIndexReader) AddChild(child Plan)
- func (p PhysicalIndexReader) AddParent(parent Plan)
- func (p PhysicalIndexReader) Allocator() *idAllocator
- func (p PhysicalIndexReader) Children() []Plan
- func (p *PhysicalIndexReader) Copy() PhysicalPlan
- func (p PhysicalIndexReader) ExplainID() string
- func (p *PhysicalIndexReader) ExplainInfo() string
- func (p PhysicalIndexReader) ID() int
- func (p PhysicalIndexReader) MarshalJSON() ([]byte, error)
- func (p PhysicalIndexReader) Parents() []Plan
- func (p PhysicalIndexReader) ReplaceChild(child, newChild Plan) error
- func (p PhysicalIndexReader) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalIndexReader) ResolveIndices()
- func (p PhysicalIndexReader) Schema() *expression.Schema
- func (p PhysicalIndexReader) SetChildren(children ...Plan)
- func (p PhysicalIndexReader) SetParents(pars ...Plan)
- func (p PhysicalIndexReader) SetSchema(schema *expression.Schema)
- func (p *PhysicalIndexReader) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalIndexScan
- func (p *PhysicalIndexScan) Copy() PhysicalPlan
- func (p *PhysicalIndexScan) ExplainInfo() string
- func (p *PhysicalIndexScan) IsPointGetByUniqueKey(sc *variable.StatementContext) bool
- func (p *PhysicalIndexScan) MarshalJSON() ([]byte, error)
- func (p *PhysicalIndexScan) ToPB(ctx context.Context) (*tipb.Executor, error)
- type PhysicalMemTable
- func (p PhysicalMemTable) AddChild(child Plan)
- func (p PhysicalMemTable) AddParent(parent Plan)
- func (p PhysicalMemTable) Allocator() *idAllocator
- func (p PhysicalMemTable) Children() []Plan
- func (p *PhysicalMemTable) Copy() PhysicalPlan
- func (p PhysicalMemTable) ExplainID() string
- func (bp *PhysicalMemTable) ExplainInfo() string
- func (p PhysicalMemTable) ID() int
- func (p *PhysicalMemTable) MarshalJSON() ([]byte, error)
- func (p PhysicalMemTable) Parents() []Plan
- func (p PhysicalMemTable) ReplaceChild(child, newChild Plan) error
- func (p PhysicalMemTable) ReplaceParent(parent, newPar Plan) error
- func (p PhysicalMemTable) ResolveIndices()
- func (p PhysicalMemTable) Schema() *expression.Schema
- func (p PhysicalMemTable) SetChildren(children ...Plan)
- func (p PhysicalMemTable) SetParents(pars ...Plan)
- func (p PhysicalMemTable) SetSchema(schema *expression.Schema)
- func (p *PhysicalMemTable) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalMergeJoin
- func (p PhysicalMergeJoin) AddChild(child Plan)
- func (p PhysicalMergeJoin) AddParent(parent Plan)
- func (p PhysicalMergeJoin) Allocator() *idAllocator
- func (p PhysicalMergeJoin) Children() []Plan
- func (p *PhysicalMergeJoin) Copy() PhysicalPlan
- func (p PhysicalMergeJoin) ExplainID() string
- func (p *PhysicalMergeJoin) ExplainInfo() string
- func (p PhysicalMergeJoin) ID() int
- func (p *PhysicalMergeJoin) MarshalJSON() ([]byte, error)
- func (p PhysicalMergeJoin) Parents() []Plan
- func (p PhysicalMergeJoin) ReplaceChild(child, newChild Plan) error
- func (p PhysicalMergeJoin) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalMergeJoin) ResolveIndices()
- func (p PhysicalMergeJoin) Schema() *expression.Schema
- func (p PhysicalMergeJoin) SetChildren(children ...Plan)
- func (p PhysicalMergeJoin) SetParents(pars ...Plan)
- func (p PhysicalMergeJoin) SetSchema(schema *expression.Schema)
- func (p *PhysicalMergeJoin) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalPlan
- type PhysicalTableReader
- func (p PhysicalTableReader) AddChild(child Plan)
- func (p PhysicalTableReader) AddParent(parent Plan)
- func (p PhysicalTableReader) Allocator() *idAllocator
- func (p PhysicalTableReader) Children() []Plan
- func (p *PhysicalTableReader) Copy() PhysicalPlan
- func (p PhysicalTableReader) ExplainID() string
- func (p *PhysicalTableReader) ExplainInfo() string
- func (p PhysicalTableReader) ID() int
- func (p PhysicalTableReader) MarshalJSON() ([]byte, error)
- func (p PhysicalTableReader) Parents() []Plan
- func (p PhysicalTableReader) ReplaceChild(child, newChild Plan) error
- func (p PhysicalTableReader) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalTableReader) ResolveIndices()
- func (p PhysicalTableReader) Schema() *expression.Schema
- func (p PhysicalTableReader) SetChildren(children ...Plan)
- func (p PhysicalTableReader) SetParents(pars ...Plan)
- func (p PhysicalTableReader) SetSchema(schema *expression.Schema)
- func (p *PhysicalTableReader) ToPB(_ context.Context) (*tipb.Executor, error)
- type PhysicalTableScan
- type PhysicalUnionScan
- func (p PhysicalUnionScan) AddChild(child Plan)
- func (p PhysicalUnionScan) AddParent(parent Plan)
- func (p PhysicalUnionScan) Allocator() *idAllocator
- func (p PhysicalUnionScan) Children() []Plan
- func (p *PhysicalUnionScan) Copy() PhysicalPlan
- func (p PhysicalUnionScan) ExplainID() string
- func (p *PhysicalUnionScan) ExplainInfo() string
- func (p PhysicalUnionScan) ID() int
- func (p PhysicalUnionScan) MarshalJSON() ([]byte, error)
- func (p PhysicalUnionScan) Parents() []Plan
- func (p PhysicalUnionScan) ReplaceChild(child, newChild Plan) error
- func (p PhysicalUnionScan) ReplaceParent(parent, newPar Plan) error
- func (p *PhysicalUnionScan) ResolveIndices()
- func (p PhysicalUnionScan) Schema() *expression.Schema
- func (p PhysicalUnionScan) SetChildren(children ...Plan)
- func (p PhysicalUnionScan) SetParents(pars ...Plan)
- func (p PhysicalUnionScan) SetSchema(schema *expression.Schema)
- func (p *PhysicalUnionScan) ToPB(_ context.Context) (*tipb.Executor, error)
- type Plan
- type Prepare
- func (p *Prepare) AddChild(child Plan)
- func (p *Prepare) AddParent(parent Plan)
- func (p *Prepare) Allocator() *idAllocator
- func (p *Prepare) Children() []Plan
- func (p *Prepare) ExplainID() string
- func (p *Prepare) ID() int
- func (p *Prepare) MarshalJSON() ([]byte, error)
- func (p *Prepare) Parents() []Plan
- func (p *Prepare) ReplaceChild(child, newChild Plan) error
- func (p *Prepare) ReplaceParent(parent, newPar Plan) error
- func (p *Prepare) ResolveIndices()
- func (p *Prepare) Schema() *expression.Schema
- func (p *Prepare) SetChildren(children ...Plan)
- func (p *Prepare) SetParents(pars ...Plan)
- func (p *Prepare) SetSchema(schema *expression.Schema)
- type Projection
- func (p Projection) AddChild(child Plan)
- func (p Projection) AddParent(parent Plan)
- func (p Projection) Allocator() *idAllocator
- func (p Projection) Children() []Plan
- func (p *Projection) Copy() PhysicalPlan
- func (p Projection) ExplainID() string
- func (p *Projection) ExplainInfo() string
- func (p Projection) ID() int
- func (p *Projection) MarshalJSON() ([]byte, error)
- func (p Projection) Parents() []Plan
- func (p *Projection) PredicatePushDown(predicates []expression.Expression) (ret []expression.Expression, retPlan LogicalPlan, err error)
- func (p *Projection) PruneColumns(parentUsedCols []*expression.Column)
- func (p Projection) ReplaceChild(child, newChild Plan) error
- func (p Projection) ReplaceParent(parent, newPar Plan) error
- func (p *Projection) ResolveIndices()
- func (p Projection) Schema() *expression.Schema
- func (p Projection) SetChildren(children ...Plan)
- func (p Projection) SetParents(pars ...Plan)
- func (p Projection) SetSchema(schema *expression.Schema)
- func (p *Projection) ToPB(_ context.Context) (*tipb.Executor, error)
- type SelectLock
- func (p SelectLock) AddChild(child Plan)
- func (p SelectLock) AddParent(parent Plan)
- func (p SelectLock) Allocator() *idAllocator
- func (p SelectLock) Children() []Plan
- func (p *SelectLock) Copy() PhysicalPlan
- func (p SelectLock) ExplainID() string
- func (p *SelectLock) ExplainInfo() string
- func (p SelectLock) ID() int
- func (p SelectLock) MarshalJSON() ([]byte, error)
- func (p SelectLock) Parents() []Plan
- func (p *SelectLock) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *SelectLock) PruneColumns(parentUsedCols []*expression.Column)
- func (p SelectLock) ReplaceChild(child, newChild Plan) error
- func (p SelectLock) ReplaceParent(parent, newPar Plan) error
- func (p SelectLock) ResolveIndices()
- func (p SelectLock) Schema() *expression.Schema
- func (p SelectLock) SetChildren(children ...Plan)
- func (p SelectLock) SetParents(pars ...Plan)
- func (p SelectLock) SetSchema(schema *expression.Schema)
- func (p *SelectLock) ToPB(_ context.Context) (*tipb.Executor, error)
- type Selection
- func (p Selection) AddChild(child Plan)
- func (p Selection) AddParent(parent Plan)
- func (p Selection) Allocator() *idAllocator
- func (p Selection) Children() []Plan
- func (p *Selection) Copy() PhysicalPlan
- func (p Selection) ExplainID() string
- func (p *Selection) ExplainInfo() string
- func (p Selection) ID() int
- func (p *Selection) MarshalJSON() ([]byte, error)
- func (p Selection) Parents() []Plan
- func (p *Selection) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *Selection) PruneColumns(parentUsedCols []*expression.Column)
- func (p Selection) ReplaceChild(child, newChild Plan) error
- func (p Selection) ReplaceParent(parent, newPar Plan) error
- func (p *Selection) ResolveIndices()
- func (p Selection) Schema() *expression.Schema
- func (p Selection) SetChildren(children ...Plan)
- func (p Selection) SetParents(pars ...Plan)
- func (p Selection) SetSchema(schema *expression.Schema)
- func (p *Selection) ToPB(ctx context.Context) (*tipb.Executor, error)
- type Set
- func (p *Set) AddChild(child Plan)
- func (p *Set) AddParent(parent Plan)
- func (p *Set) Allocator() *idAllocator
- func (p *Set) Children() []Plan
- func (p *Set) ExplainID() string
- func (p *Set) ID() int
- func (p *Set) MarshalJSON() ([]byte, error)
- func (p *Set) Parents() []Plan
- func (p *Set) ReplaceChild(child, newChild Plan) error
- func (p *Set) ReplaceParent(parent, newPar Plan) error
- func (p *Set) ResolveIndices()
- func (p *Set) Schema() *expression.Schema
- func (p *Set) SetChildren(children ...Plan)
- func (p *Set) SetParents(pars ...Plan)
- func (p *Set) SetSchema(schema *expression.Schema)
- type Show
- func (p Show) AddChild(child Plan)
- func (p Show) AddParent(parent Plan)
- func (p Show) Allocator() *idAllocator
- func (p Show) Children() []Plan
- func (p *Show) Copy() PhysicalPlan
- func (p Show) ExplainID() string
- func (bp *Show) ExplainInfo() string
- func (p Show) ID() int
- func (p Show) MarshalJSON() ([]byte, error)
- func (p Show) Parents() []Plan
- func (p *Show) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *Show) PruneColumns(parentUsedCols []*expression.Column)
- func (p Show) ReplaceChild(child, newChild Plan) error
- func (p Show) ReplaceParent(parent, newPar Plan) error
- func (p Show) ResolveIndices()
- func (p Show) Schema() *expression.Schema
- func (p Show) SetChildren(children ...Plan)
- func (p Show) SetParents(pars ...Plan)
- func (p Show) SetSchema(schema *expression.Schema)
- func (p *Show) ToPB(_ context.Context) (*tipb.Executor, error)
- type ShowDDL
- func (p *ShowDDL) AddChild(child Plan)
- func (p *ShowDDL) AddParent(parent Plan)
- func (p *ShowDDL) Allocator() *idAllocator
- func (p *ShowDDL) Children() []Plan
- func (p *ShowDDL) ExplainID() string
- func (p *ShowDDL) ID() int
- func (p *ShowDDL) MarshalJSON() ([]byte, error)
- func (p *ShowDDL) Parents() []Plan
- func (p *ShowDDL) ReplaceChild(child, newChild Plan) error
- func (p *ShowDDL) ReplaceParent(parent, newPar Plan) error
- func (p *ShowDDL) ResolveIndices()
- func (p *ShowDDL) Schema() *expression.Schema
- func (p *ShowDDL) SetChildren(children ...Plan)
- func (p *ShowDDL) SetParents(pars ...Plan)
- func (p *ShowDDL) SetSchema(schema *expression.Schema)
- type ShowDDLJobs
- func (p *ShowDDLJobs) AddChild(child Plan)
- func (p *ShowDDLJobs) AddParent(parent Plan)
- func (p *ShowDDLJobs) Allocator() *idAllocator
- func (p *ShowDDLJobs) Children() []Plan
- func (p *ShowDDLJobs) ExplainID() string
- func (p *ShowDDLJobs) ID() int
- func (p *ShowDDLJobs) MarshalJSON() ([]byte, error)
- func (p *ShowDDLJobs) Parents() []Plan
- func (p *ShowDDLJobs) ReplaceChild(child, newChild Plan) error
- func (p *ShowDDLJobs) ReplaceParent(parent, newPar Plan) error
- func (p *ShowDDLJobs) ResolveIndices()
- func (p *ShowDDLJobs) Schema() *expression.Schema
- func (p *ShowDDLJobs) SetChildren(children ...Plan)
- func (p *ShowDDLJobs) SetParents(pars ...Plan)
- func (p *ShowDDLJobs) SetSchema(schema *expression.Schema)
- type Simple
- func (p *Simple) AddChild(child Plan)
- func (p *Simple) AddParent(parent Plan)
- func (p *Simple) Allocator() *idAllocator
- func (p *Simple) Children() []Plan
- func (p *Simple) ExplainID() string
- func (p *Simple) ID() int
- func (p *Simple) MarshalJSON() ([]byte, error)
- func (p *Simple) Parents() []Plan
- func (p *Simple) ReplaceChild(child, newChild Plan) error
- func (p *Simple) ReplaceParent(parent, newPar Plan) error
- func (p *Simple) ResolveIndices()
- func (p *Simple) Schema() *expression.Schema
- func (p *Simple) SetChildren(children ...Plan)
- func (p *Simple) SetParents(pars ...Plan)
- func (p *Simple) SetSchema(schema *expression.Schema)
- type Sort
- func (p Sort) AddChild(child Plan)
- func (p Sort) AddParent(parent Plan)
- func (p Sort) Allocator() *idAllocator
- func (p Sort) Children() []Plan
- func (p *Sort) Copy() PhysicalPlan
- func (p Sort) ExplainID() string
- func (p *Sort) ExplainInfo() string
- func (p Sort) ID() int
- func (p *Sort) MarshalJSON() ([]byte, error)
- func (p Sort) Parents() []Plan
- func (p *Sort) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *Sort) PruneColumns(parentUsedCols []*expression.Column)
- func (p Sort) ReplaceChild(child, newChild Plan) error
- func (p Sort) ReplaceParent(parent, newPar Plan) error
- func (p *Sort) ResolveIndices()
- func (p Sort) Schema() *expression.Schema
- func (p Sort) SetChildren(children ...Plan)
- func (p Sort) SetParents(pars ...Plan)
- func (p Sort) SetSchema(schema *expression.Schema)
- func (p *Sort) ToPB(_ context.Context) (*tipb.Executor, error)
- type TableDual
- func (p TableDual) AddChild(child Plan)
- func (p TableDual) AddParent(parent Plan)
- func (p TableDual) Allocator() *idAllocator
- func (p TableDual) Children() []Plan
- func (p *TableDual) Copy() PhysicalPlan
- func (p TableDual) ExplainID() string
- func (p *TableDual) ExplainInfo() string
- func (p TableDual) ID() int
- func (p TableDual) MarshalJSON() ([]byte, error)
- func (p TableDual) Parents() []Plan
- func (p *TableDual) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *TableDual) PruneColumns(_ []*expression.Column)
- func (p TableDual) ReplaceChild(child, newChild Plan) error
- func (p TableDual) ReplaceParent(parent, newPar Plan) error
- func (p TableDual) ResolveIndices()
- func (p TableDual) Schema() *expression.Schema
- func (p TableDual) SetChildren(children ...Plan)
- func (p TableDual) SetParents(pars ...Plan)
- func (p TableDual) SetSchema(schema *expression.Schema)
- func (p *TableDual) ToPB(_ context.Context) (*tipb.Executor, error)
- type TopN
- func (p TopN) AddChild(child Plan)
- func (p TopN) AddParent(parent Plan)
- func (p TopN) Allocator() *idAllocator
- func (p TopN) Children() []Plan
- func (p *TopN) Copy() PhysicalPlan
- func (p TopN) ExplainID() string
- func (bp *TopN) ExplainInfo() string
- func (p TopN) ID() int
- func (p TopN) MarshalJSON() ([]byte, error)
- func (p TopN) Parents() []Plan
- func (p *TopN) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *TopN) PruneColumns(parentUsedCols []*expression.Column)
- func (p TopN) ReplaceChild(child, newChild Plan) error
- func (p TopN) ReplaceParent(parent, newPar Plan) error
- func (p *TopN) ResolveIndices()
- func (p TopN) Schema() *expression.Schema
- func (p TopN) SetChildren(children ...Plan)
- func (p TopN) SetParents(pars ...Plan)
- func (p TopN) SetSchema(schema *expression.Schema)
- func (p *TopN) ToPB(ctx context.Context) (*tipb.Executor, error)
- type Union
- func (p Union) AddChild(child Plan)
- func (p Union) AddParent(parent Plan)
- func (p Union) Allocator() *idAllocator
- func (p Union) Children() []Plan
- func (p *Union) Copy() PhysicalPlan
- func (p Union) ExplainID() string
- func (bp *Union) ExplainInfo() string
- func (p Union) ID() int
- func (p Union) MarshalJSON() ([]byte, error)
- func (p Union) Parents() []Plan
- func (p *Union) PredicatePushDown(predicates []expression.Expression) (ret []expression.Expression, retPlan LogicalPlan, err error)
- func (p *Union) PruneColumns(parentUsedCols []*expression.Column)
- func (p Union) ReplaceChild(child, newChild Plan) error
- func (p Union) ReplaceParent(parent, newPar Plan) error
- func (p Union) ResolveIndices()
- func (p Union) Schema() *expression.Schema
- func (p Union) SetChildren(children ...Plan)
- func (p Union) SetParents(pars ...Plan)
- func (p Union) SetSchema(schema *expression.Schema)
- func (p *Union) ToPB(_ context.Context) (*tipb.Executor, error)
- type Update
- func (p Update) AddChild(child Plan)
- func (p Update) AddParent(parent Plan)
- func (p Update) Allocator() *idAllocator
- func (p Update) Children() []Plan
- func (p *Update) Copy() PhysicalPlan
- func (p Update) ExplainID() string
- func (bp *Update) ExplainInfo() string
- func (p Update) ID() int
- func (p Update) MarshalJSON() ([]byte, error)
- func (p Update) Parents() []Plan
- func (p *Update) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- func (p *Update) PruneColumns(parentUsedCols []*expression.Column)
- func (p Update) ReplaceChild(child, newChild Plan) error
- func (p Update) ReplaceParent(parent, newPar Plan) error
- func (p *Update) ResolveIndices()
- func (p Update) Schema() *expression.Schema
- func (p Update) SetChildren(children ...Plan)
- func (p Update) SetParents(pars ...Plan)
- func (p Update) SetSchema(schema *expression.Schema)
- func (p *Update) ToPB(_ context.Context) (*tipb.Executor, error)
Constants ¶
const ( // TypeSel is the type of Selection. TypeSel = "Selection" // TypeSet is the type of Set. TypeSet = "Set" // TypeProj is the type of Projection. TypeProj = "Projection" // TypeAgg is the type of Aggregation. TypeAgg = "Aggregation" // TypeStreamAgg is the type of StreamAgg. TypeStreamAgg = "StreamAgg" // TypeHashAgg is the type of HashAgg. TypeHashAgg = "HashAgg" // TypeCache is the type of cache. TypeCache = "Cache" // TypeShow is the type of show. TypeShow = "Show" // TypeJoin is the type of Join. TypeJoin = "Join" // TypeUnion is the type of Union. TypeUnion = "Union" // TypeTableScan is the type of TableScan. TypeTableScan = "TableScan" // TypeMemTableScan is the type of TableScan. TypeMemTableScan = "MemTableScan" // TypeUnionScan is the type of UnionScan. TypeUnionScan = "UnionScan" // TypeIdxScan is the type of IndexScan. TypeIdxScan = "IndexScan" // TypeSort is the type of Sort. TypeSort = "Sort" // TypeTopN is the type of TopN. TypeTopN = "TopN" // TypeLimit is the type of Limit. TypeLimit = "Limit" // TypeHashSemiJoin is the type of hash semi join. TypeHashSemiJoin = "HashSemiJoin" // TypeHashLeftJoin is the type of left hash join. TypeHashLeftJoin = "HashLeftJoin" // TypeHashRightJoin is the type of right hash join. TypeHashRightJoin = "HashRightJoin" // TypeMergeJoin is the type of merge join. TypeMergeJoin = "MergeJoin" // TypeIndexJoin is the type of index look up join. TypeIndexJoin = "IndexJoin" // TypeApply is the type of Apply. TypeApply = "Apply" // TypeMaxOneRow is the type of MaxOneRow. TypeMaxOneRow = "MaxOneRow" // TypeExists is the type of Exists. TypeExists = "Exists" // TypeDual is the type of TableDual. TypeDual = "TableDual" // TypeLock is the type of SelectLock. TypeLock = "SelectLock" // TypeInsert is the type of Insert TypeInsert = "Insert" // TypeUpate is the type of Update. TypeUpate = "Update" // TypeDelete is the type of Delete. TypeDelete = "Delete" // TypeIndexLookUp is the type of IndexLookUp. TypeIndexLookUp = "IndexLookUp" // TypeTableReader is the type of TableReader. TypeTableReader = "TableReader" // TypeIndexReader is the type of IndexReader. TypeIndexReader = "IndexReader" )
const ( // TiDBMergeJoin is hint enforce merge join. TiDBMergeJoin = "tidb_smj" // TiDBIndexNestedLoopJoin is hint enforce index nested loop join. TiDBIndexNestedLoopJoin = "tidb_inlj" )
const ( CodeOperandColumns terror.ErrCode = 1 CodeInvalidWildCard terror.ErrCode = 3 CodeUnsupported terror.ErrCode = 4 CodeInvalidGroupFuncUse terror.ErrCode = 5 CodeIllegalReference terror.ErrCode = 6 // MySQL error code. CodeNoDB terror.ErrCode = mysql.ErrNoDB CodeUnknownExplainFormat terror.ErrCode = mysql.ErrUnknownExplainFormat )
Optimizer error codes.
const ( CodeUnsupportedType terror.ErrCode = 1 SystemInternalError = 2 CodeAlterAutoID = 3 CodeAnalyzeMissIndex = 4 CodeAmbiguous = 1052 CodeUnknownColumn = mysql.ErrBadField CodeUnknownTable = mysql.ErrBadTable CodeWrongArguments = 1210 CodeBadGeneratedColumn = mysql.ErrBadGeneratedColumn )
Error codes.
Variables ¶
var ( ErrOperandColumns = terror.ClassOptimizer.New(CodeOperandColumns, "Operand should contain %d column(s)") ErrInvalidWildCard = terror.ClassOptimizer.New(CodeInvalidWildCard, "Wildcard fields without any table name appears in wrong place") ErrCartesianProductUnsupported = terror.ClassOptimizer.New(CodeUnsupported, "Cartesian product is unsupported") ErrInvalidGroupFuncUse = terror.ClassOptimizer.New(CodeInvalidGroupFuncUse, "Invalid use of group function") ErrIllegalReference = terror.ClassOptimizer.New(CodeIllegalReference, "Illegal reference") ErrNoDB = terror.ClassOptimizer.New(CodeNoDB, "No database selected") ErrUnknownExplainFormat = terror.ClassOptimizer.New(CodeUnknownExplainFormat, mysql.MySQLErrName[mysql.ErrUnknownExplainFormat]) )
Optimizer base errors.
var ( ErrUnsupportedType = terror.ClassOptimizerPlan.New(CodeUnsupportedType, "Unsupported type") SystemInternalErrorType = terror.ClassOptimizerPlan.New(SystemInternalError, "System internal error") ErrUnknownColumn = terror.ClassOptimizerPlan.New(CodeUnknownColumn, mysql.MySQLErrName[mysql.ErrBadField]) ErrUnknownTable = terror.ClassOptimizerPlan.New(CodeUnknownColumn, mysql.MySQLErrName[mysql.ErrBadTable]) ErrWrongArguments = terror.ClassOptimizerPlan.New(CodeWrongArguments, "Incorrect arguments to EXECUTE") ErrAmbiguous = terror.ClassOptimizerPlan.New(CodeAmbiguous, "Column '%s' in field list is ambiguous") ErrAnalyzeMissIndex = terror.ClassOptimizerPlan.New(CodeAnalyzeMissIndex, "Index '%s' in field list does not exist in table '%s'") ErrAlterAutoID = terror.ClassAutoid.New(CodeAlterAutoID, "No support for setting auto_increment using alter_table") ErrBadGeneratedColumn = terror.ClassOptimizerPlan.New(CodeBadGeneratedColumn, mysql.MySQLErrName[mysql.ErrBadGeneratedColumn]) )
Error instances.
var AllowCartesianProduct = true
AllowCartesianProduct means whether tidb allows cartesian join without equal conditions.
var EvalSubquery func(p PhysicalPlan, is infoschema.InfoSchema, ctx context.Context) ([][]types.Datum, error)
EvalSubquery evaluates incorrelated subqueries once.
var JoinConcurrency = 5
JoinConcurrency means the number of goroutines that participate in joining.
Functions ¶
func InsertPlan ¶
InsertPlan means inserting plan between two plans.
func MockResolveName ¶
func MockResolveName(node ast.Node, info infoschema.InfoSchema, defaultSchema string, ctx context.Context) error
MockResolveName only serves for test.
func PrepareStmt ¶
func PrepareStmt(is infoschema.InfoSchema, ctx context.Context, node ast.Node) error
PrepareStmt prepares a raw statement parsed from parser. The statement must be prepared before it can be passed to optimize function. We pass InfoSchema instead of getting from Context in case it is changed after resolving name.
func Preprocess ¶
func Preprocess(node ast.Node, info infoschema.InfoSchema, ctx context.Context) error
Preprocess does preprocess work for optimizer.
func ResolveName ¶
func ResolveName(node ast.Node, info infoschema.InfoSchema, ctx context.Context) error
ResolveName resolves table name and column name. It generates ResultFields for ResultSetNode and resolves ColumnNameExpr to a ResultField.
func UseDAGPlanBuilder ¶
UseDAGPlanBuilder checks if we use new DAG planner.
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 AggregationType ¶
type AggregationType int
AggregationType stands for the mode of aggregation plan.
const ( // StreamedAgg supposes its input is sorted by group by key. StreamedAgg AggregationType = iota // FinalAgg supposes its input is partial results. FinalAgg // CompleteAgg supposes its input is original results. CompleteAgg )
func (AggregationType) String ¶
func (at AggregationType) String() string
String implements fmt.Stringer interface.
type Analyze ¶
type Analyze struct { ColTasks []AnalyzeColumnsTask IdxTasks []AnalyzeIndexTask // contains filtered or unexported fields }
Analyze represents an analyze plan
func (*Analyze) AddChild ¶
func (p *Analyze) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*Analyze) AddParent ¶
func (p *Analyze) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Analyze) Children ¶
func (p *Analyze) Children() []Plan
Children implements Plan Children interface.
func (*Analyze) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Analyze) Parents ¶
func (p *Analyze) Parents() []Plan
Parents implements Plan Parents interface.
func (*Analyze) PruneColumns ¶
func (p *Analyze) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface. We should not prune columns for Analyze.
func (*Analyze) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*Analyze) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Analyze) ResolveIndices ¶
func (p *Analyze) ResolveIndices()
ResolveIndices implements Plan interface.
func (*Analyze) Schema ¶
func (p *Analyze) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Analyze) SetChildren ¶
func (p *Analyze) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*Analyze) SetParents ¶
func (p *Analyze) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*Analyze) SetSchema ¶
func (p *Analyze) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type AnalyzeColumnsTask ¶
type AnalyzeColumnsTask struct { TableInfo *model.TableInfo PKInfo *model.ColumnInfo ColsInfo []*model.ColumnInfo PushDown bool }
AnalyzeColumnsTask is used for analyze columns.
type AnalyzeIndexTask ¶
type AnalyzeIndexTask struct { TableInfo *model.TableInfo IndexInfo *model.IndexInfo PushDown bool }
AnalyzeIndexTask is used for analyze index.
type ByItems ¶
type ByItems struct { Expr expression.Expression Desc bool }
ByItems wraps a "by" item.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache plan is a physical plan which stores the result of its child node.
func (Cache) AddChild ¶
func (p Cache) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Cache) AddParent ¶
func (p Cache) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Cache) Children ¶
func (p Cache) Children() []Plan
Children implements Plan Children interface.
func (*Cache) Copy ¶
func (p *Cache) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Cache) ExplainInfo ¶
func (bp *Cache) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (Cache) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (Cache) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Cache) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (Cache) ResolveIndices ¶
func (p Cache) ResolveIndices()
ResolveIndices implements Plan interface.
func (Cache) Schema ¶
func (p Cache) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Cache) SetChildren ¶
func (p Cache) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Cache) SetParents ¶
func (p Cache) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Cache) SetSchema ¶
func (p Cache) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type CancelDDLJobs ¶ added in v1.0.1
type CancelDDLJobs struct { JobIDs []int64 // contains filtered or unexported fields }
CancelDDLJobs represents a cancel DDL jobs plan.
func (*CancelDDLJobs) AddChild ¶ added in v1.0.1
func (p *CancelDDLJobs) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*CancelDDLJobs) AddParent ¶ added in v1.0.1
func (p *CancelDDLJobs) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*CancelDDLJobs) Children ¶ added in v1.0.1
func (p *CancelDDLJobs) Children() []Plan
Children implements Plan Children interface.
func (*CancelDDLJobs) ID ¶ added in v1.0.1
func (p *CancelDDLJobs) ID() int
ID implements Plan ID interface.
func (*CancelDDLJobs) MarshalJSON ¶ added in v1.0.1
MarshalJSON implements json.Marshaler interface.
func (*CancelDDLJobs) Parents ¶ added in v1.0.1
func (p *CancelDDLJobs) Parents() []Plan
Parents implements Plan Parents interface.
func (*CancelDDLJobs) ReplaceChild ¶ added in v1.0.1
ReplaceChild means replace a child with another one.
func (*CancelDDLJobs) ReplaceParent ¶ added in v1.0.1
ReplaceParent means replace a parent for another one.
func (*CancelDDLJobs) ResolveIndices ¶ added in v1.0.1
func (p *CancelDDLJobs) ResolveIndices()
ResolveIndices implements Plan interface.
func (*CancelDDLJobs) Schema ¶ added in v1.0.1
func (p *CancelDDLJobs) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*CancelDDLJobs) SetChildren ¶ added in v1.0.1
func (p *CancelDDLJobs) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*CancelDDLJobs) SetParents ¶ added in v1.0.1
func (p *CancelDDLJobs) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*CancelDDLJobs) SetSchema ¶ added in v1.0.1
func (p *CancelDDLJobs) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type CheckTable ¶
CheckTable is used for checking table data, built from the 'admin check table' statement.
func (*CheckTable) AddChild ¶
func (p *CheckTable) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*CheckTable) AddParent ¶
func (p *CheckTable) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*CheckTable) Children ¶
func (p *CheckTable) Children() []Plan
Children implements Plan Children interface.
func (*CheckTable) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*CheckTable) Parents ¶
func (p *CheckTable) Parents() []Plan
Parents implements Plan Parents interface.
func (*CheckTable) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*CheckTable) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*CheckTable) ResolveIndices ¶
func (p *CheckTable) ResolveIndices()
ResolveIndices implements Plan interface.
func (*CheckTable) Schema ¶
func (p *CheckTable) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*CheckTable) SetChildren ¶
func (p *CheckTable) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*CheckTable) SetParents ¶
func (p *CheckTable) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*CheckTable) SetSchema ¶
func (p *CheckTable) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type DDL ¶
DDL represents a DDL statement plan.
func (*DDL) AddChild ¶
func (p *DDL) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*DDL) AddParent ¶
func (p *DDL) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*DDL) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*DDL) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*DDL) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*DDL) ResolveIndices ¶
func (p *DDL) ResolveIndices()
ResolveIndices implements Plan interface.
func (*DDL) Schema ¶
func (p *DDL) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*DDL) SetChildren ¶
func (p *DDL) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*DDL) SetParents ¶
func (p *DDL) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*DDL) SetSchema ¶
func (p *DDL) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type DataSource ¶
type DataSource struct { Columns []*model.ColumnInfo DBName model.CIStr TableAsName *model.CIStr LimitCount *int64 // NeedColHandle is used in execution phase. NeedColHandle bool // contains filtered or unexported fields }
DataSource represents a tablescan without condition push down.
func (DataSource) AddChild ¶
func (p DataSource) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (DataSource) AddParent ¶
func (p DataSource) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (DataSource) Children ¶
func (p DataSource) Children() []Plan
Children implements Plan Children interface.
func (DataSource) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (DataSource) Parents ¶
func (p DataSource) Parents() []Plan
Parents implements Plan Parents interface.
func (*DataSource) PredicatePushDown ¶
func (p *DataSource) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*DataSource) PruneColumns ¶
func (p *DataSource) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (DataSource) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (DataSource) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (DataSource) ResolveIndices ¶
func (p DataSource) ResolveIndices()
ResolveIndices implements Plan interface.
func (*DataSource) Schema ¶
func (p *DataSource) Schema() *expression.Schema
Schema implements the plan interface.
func (DataSource) SetChildren ¶
func (p DataSource) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (DataSource) SetParents ¶
func (p DataSource) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (DataSource) SetSchema ¶
func (p DataSource) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
func (*DataSource) TableInfo ¶
func (p *DataSource) TableInfo() *model.TableInfo
TableInfo returns the *TableInfo of data source.
type Deallocate ¶
type Deallocate struct { Name string // contains filtered or unexported fields }
Deallocate represents deallocate plan.
func (*Deallocate) AddChild ¶
func (p *Deallocate) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*Deallocate) AddParent ¶
func (p *Deallocate) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Deallocate) Children ¶
func (p *Deallocate) Children() []Plan
Children implements Plan Children interface.
func (*Deallocate) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Deallocate) Parents ¶
func (p *Deallocate) Parents() []Plan
Parents implements Plan Parents interface.
func (*Deallocate) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*Deallocate) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Deallocate) ResolveIndices ¶
func (p *Deallocate) ResolveIndices()
ResolveIndices implements Plan interface.
func (*Deallocate) Schema ¶
func (p *Deallocate) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Deallocate) SetChildren ¶
func (p *Deallocate) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*Deallocate) SetParents ¶
func (p *Deallocate) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*Deallocate) SetSchema ¶
func (p *Deallocate) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Delete ¶
type Delete struct { Tables []*ast.TableName IsMultiTable bool // contains filtered or unexported fields }
Delete represents a delete plan.
func (Delete) AddChild ¶
func (p Delete) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Delete) AddParent ¶
func (p Delete) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Delete) Children ¶
func (p Delete) Children() []Plan
Children implements Plan Children interface.
func (*Delete) Copy ¶
func (p *Delete) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Delete) ExplainInfo ¶
func (bp *Delete) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (Delete) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Delete) PredicatePushDown ¶
func (p *Delete) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan interface.
func (*Delete) PruneColumns ¶
func (p *Delete) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Delete) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Delete) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (Delete) ResolveIndices ¶
func (p Delete) ResolveIndices()
ResolveIndices implements Plan interface.
func (Delete) Schema ¶
func (p Delete) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Delete) SetChildren ¶
func (p Delete) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Delete) SetParents ¶
func (p Delete) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Delete) SetSchema ¶
func (p Delete) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Execute ¶
type Execute struct { Name string UsingVars []expression.Expression ExecID uint32 // contains filtered or unexported fields }
Execute represents prepare plan.
func (*Execute) AddChild ¶
func (p *Execute) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*Execute) AddParent ¶
func (p *Execute) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Execute) Children ¶
func (p *Execute) Children() []Plan
Children implements Plan Children interface.
func (*Execute) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Execute) Parents ¶
func (p *Execute) Parents() []Plan
Parents implements Plan Parents interface.
func (*Execute) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*Execute) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Execute) ResolveIndices ¶
func (p *Execute) ResolveIndices()
ResolveIndices implements Plan interface.
func (*Execute) Schema ¶
func (p *Execute) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Execute) SetChildren ¶
func (p *Execute) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*Execute) SetParents ¶
func (p *Execute) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*Execute) SetSchema ¶
func (p *Execute) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Exists ¶
type Exists struct {
// contains filtered or unexported fields
}
Exists checks if a query returns result.
func (Exists) AddChild ¶
func (p Exists) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Exists) AddParent ¶
func (p Exists) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Exists) Children ¶
func (p Exists) Children() []Plan
Children implements Plan Children interface.
func (*Exists) Copy ¶
func (p *Exists) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Exists) ExplainInfo ¶
func (bp *Exists) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (Exists) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Exists) PredicatePushDown ¶
func (p *Exists) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan interface.
func (*Exists) PruneColumns ¶
func (p *Exists) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Exists) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Exists) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (Exists) ResolveIndices ¶
func (p Exists) ResolveIndices()
ResolveIndices implements Plan interface.
func (Exists) Schema ¶
func (p Exists) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Exists) SetChildren ¶
func (p Exists) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Exists) SetParents ¶
func (p Exists) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Exists) SetSchema ¶
func (p Exists) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Explain ¶
type Explain struct { StmtPlan Plan Rows [][]types.Datum // contains filtered or unexported fields }
Explain represents a explain plan.
func (*Explain) AddChild ¶
func (p *Explain) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*Explain) AddParent ¶
func (p *Explain) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Explain) Children ¶
func (p *Explain) Children() []Plan
Children implements Plan Children interface.
func (*Explain) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Explain) Parents ¶
func (p *Explain) Parents() []Plan
Parents implements Plan Parents interface.
func (*Explain) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*Explain) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Explain) ResolveIndices ¶
func (p *Explain) ResolveIndices()
ResolveIndices implements Plan interface.
func (*Explain) Schema ¶
func (p *Explain) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Explain) SetChildren ¶
func (p *Explain) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*Explain) SetParents ¶
func (p *Explain) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*Explain) SetSchema ¶
func (p *Explain) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Insert ¶
type Insert struct { Table table.Table Columns []*ast.ColumnName Lists [][]expression.Expression Setlist []*expression.Assignment OnDuplicate []*expression.Assignment IsReplace bool Priority mysql.PriorityEnum IgnoreErr bool // NeedFillDefaultValue is true when expr in value list reference other column. NeedFillDefaultValue bool GenCols InsertGeneratedColumns // contains filtered or unexported fields }
Insert represents an insert plan.
func (Insert) AddChild ¶
func (p Insert) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Insert) AddParent ¶
func (p Insert) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Insert) Children ¶
func (p Insert) Children() []Plan
Children implements Plan Children interface.
func (*Insert) Copy ¶
func (p *Insert) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Insert) ExplainInfo ¶
func (bp *Insert) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (Insert) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Insert) PredicatePushDown ¶
func (p *Insert) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan interface.
func (*Insert) PruneColumns ¶
func (p *Insert) PruneColumns(_ []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Insert) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Insert) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Insert) ResolveIndices ¶
func (p *Insert) ResolveIndices()
ResolveIndices implements Plan interface.
func (Insert) Schema ¶
func (p Insert) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Insert) SetChildren ¶
func (p Insert) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Insert) SetParents ¶
func (p Insert) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Insert) SetSchema ¶
func (p Insert) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type InsertGeneratedColumns ¶
type InsertGeneratedColumns struct { Columns []*ast.ColumnName Exprs []expression.Expression OnDuplicates []*expression.Assignment }
InsertGeneratedColumns is for completing generated columns in Insert. We resolve generation expressions in plan, and eval those in executor.
type JoinType ¶
type JoinType int
JoinType contains CrossJoin, InnerJoin, LeftOuterJoin, RightOuterJoin, FullOuterJoin, SemiJoin.
const ( // InnerJoin means inner join. InnerJoin JoinType = iota // LeftOuterJoin means left join. LeftOuterJoin // RightOuterJoin means right join. RightOuterJoin // SemiJoin means if row a in table A matches some rows in B, just output a. SemiJoin // LeftOuterSemiJoin means if row a in table A matches some rows in B, output (a, true), otherwise, output (a, false). LeftOuterSemiJoin )
type Limit ¶
Limit represents offset and limit plan.
func (Limit) AddChild ¶
func (p Limit) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Limit) AddParent ¶
func (p Limit) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Limit) Children ¶
func (p Limit) Children() []Plan
Children implements Plan Children interface.
func (*Limit) Copy ¶
func (p *Limit) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Limit) ExplainInfo ¶
ExplainInfo implements PhysicalPlan interface.
func (*Limit) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Limit) PredicatePushDown ¶
func (p *Limit) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*Limit) PruneColumns ¶
func (p *Limit) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Limit) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Limit) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (Limit) ResolveIndices ¶
func (p Limit) ResolveIndices()
ResolveIndices implements Plan interface.
func (Limit) Schema ¶
func (p Limit) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Limit) SetChildren ¶
func (p Limit) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Limit) SetParents ¶
func (p Limit) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Limit) SetSchema ¶
func (p Limit) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type LoadData ¶
type LoadData struct { IsLocal bool Path string Table *ast.TableName Columns []*ast.ColumnName FieldsInfo *ast.FieldsClause LinesInfo *ast.LinesClause GenCols InsertGeneratedColumns // contains filtered or unexported fields }
LoadData represents a loaddata plan.
func (*LoadData) AddChild ¶
func (p *LoadData) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*LoadData) AddParent ¶
func (p *LoadData) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*LoadData) Children ¶
func (p *LoadData) Children() []Plan
Children implements Plan Children interface.
func (*LoadData) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*LoadData) Parents ¶
func (p *LoadData) Parents() []Plan
Parents implements Plan Parents interface.
func (*LoadData) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*LoadData) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*LoadData) ResolveIndices ¶
func (p *LoadData) ResolveIndices()
ResolveIndices implements Plan interface.
func (*LoadData) Schema ¶
func (p *LoadData) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*LoadData) SetChildren ¶
func (p *LoadData) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*LoadData) SetParents ¶
func (p *LoadData) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*LoadData) SetSchema ¶
func (p *LoadData) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type LogicalAggregation ¶
type LogicalAggregation struct { AggFuncs []aggregation.Aggregation GroupByItems []expression.Expression // contains filtered or unexported fields }
LogicalAggregation represents an aggregate plan.
func (LogicalAggregation) AddChild ¶
func (p LogicalAggregation) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (LogicalAggregation) AddParent ¶
func (p LogicalAggregation) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (LogicalAggregation) Children ¶
func (p LogicalAggregation) Children() []Plan
Children implements Plan Children interface.
func (LogicalAggregation) ID ¶
func (p LogicalAggregation) ID() int
ID implements Plan ID interface.
func (LogicalAggregation) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (LogicalAggregation) Parents ¶
func (p LogicalAggregation) Parents() []Plan
Parents implements Plan Parents interface.
func (*LogicalAggregation) PredicatePushDown ¶
func (p *LogicalAggregation) PredicatePushDown(predicates []expression.Expression) (ret []expression.Expression, retPlan LogicalPlan, err error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*LogicalAggregation) PruneColumns ¶
func (p *LogicalAggregation) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (LogicalAggregation) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (LogicalAggregation) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*LogicalAggregation) ResolveIndices ¶
func (p *LogicalAggregation) ResolveIndices()
ResolveIndices implements Plan interface.
func (LogicalAggregation) Schema ¶
func (p LogicalAggregation) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (LogicalAggregation) SetChildren ¶
func (p LogicalAggregation) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (LogicalAggregation) SetParents ¶
func (p LogicalAggregation) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (LogicalAggregation) SetSchema ¶
func (p LogicalAggregation) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type LogicalApply ¶
type LogicalApply struct { LogicalJoin // contains filtered or unexported fields }
LogicalApply gets one row from outer executor and gets one row from inner executor according to outer row.
func (LogicalApply) AddChild ¶
func (p LogicalApply) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (LogicalApply) AddParent ¶
func (p LogicalApply) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (LogicalApply) Children ¶
func (p LogicalApply) Children() []Plan
Children implements Plan Children interface.
func (LogicalApply) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (LogicalApply) Parents ¶
func (p LogicalApply) Parents() []Plan
Parents implements Plan Parents interface.
func (*LogicalApply) PruneColumns ¶
func (p *LogicalApply) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (LogicalApply) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (LogicalApply) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*LogicalApply) ResolveIndices ¶
func (p *LogicalApply) ResolveIndices()
ResolveIndices implements Plan interface.
func (LogicalApply) Schema ¶
func (p LogicalApply) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (LogicalApply) SetChildren ¶
func (p LogicalApply) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (LogicalApply) SetParents ¶
func (p LogicalApply) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (LogicalApply) SetSchema ¶
func (p LogicalApply) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type LogicalJoin ¶
type LogicalJoin struct { JoinType JoinType EqualConditions []*expression.ScalarFunction LeftConditions expression.CNFExprs RightConditions expression.CNFExprs OtherConditions expression.CNFExprs LeftJoinKeys []*expression.Column RightJoinKeys []*expression.Column // DefaultValues is only used for outer join, which stands for the default values when the outer table cannot find join partner // instead of null padding. DefaultValues []types.Datum // contains filtered or unexported fields }
LogicalJoin is the logical join plan.
func (LogicalJoin) AddChild ¶
func (p LogicalJoin) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (LogicalJoin) AddParent ¶
func (p LogicalJoin) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (LogicalJoin) Children ¶
func (p LogicalJoin) Children() []Plan
Children implements Plan Children interface.
func (LogicalJoin) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (LogicalJoin) Parents ¶
func (p LogicalJoin) Parents() []Plan
Parents implements Plan Parents interface.
func (*LogicalJoin) PredicatePushDown ¶
func (p *LogicalJoin) PredicatePushDown(predicates []expression.Expression) (ret []expression.Expression, retPlan LogicalPlan, err error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*LogicalJoin) PruneColumns ¶
func (p *LogicalJoin) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (LogicalJoin) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (LogicalJoin) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*LogicalJoin) ResolveIndices ¶
func (p *LogicalJoin) ResolveIndices()
ResolveIndices implements Plan interface.
func (LogicalJoin) Schema ¶
func (p LogicalJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (LogicalJoin) SetChildren ¶
func (p LogicalJoin) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (LogicalJoin) SetParents ¶
func (p LogicalJoin) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (LogicalJoin) SetSchema ¶
func (p LogicalJoin) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type LogicalPlan ¶
type LogicalPlan interface { Plan // PredicatePushDown pushes down the predicates in the where/on/having clauses as deeply as possible. // It will accept a predicate that is an expression slice, and return the expressions that can't be pushed. // Because it might change the root if the having clause exists, we need to return a plan that represents a new root. PredicatePushDown([]expression.Expression) ([]expression.Expression, LogicalPlan, error) // PruneColumns prunes the unused columns. PruneColumns([]*expression.Column) // contains filtered or unexported methods }
LogicalPlan is a tree of logical operators. We can do a lot of logical optimizations to it, like predicate pushdown and column pruning.
type MaxOneRow ¶
type MaxOneRow struct {
// contains filtered or unexported fields
}
MaxOneRow checks if a query returns no more than one row.
func (MaxOneRow) AddChild ¶
func (p MaxOneRow) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (MaxOneRow) AddParent ¶
func (p MaxOneRow) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (MaxOneRow) Children ¶
func (p MaxOneRow) Children() []Plan
Children implements Plan Children interface.
func (*MaxOneRow) Copy ¶
func (p *MaxOneRow) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*MaxOneRow) ExplainInfo ¶
func (bp *MaxOneRow) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (MaxOneRow) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (MaxOneRow) Parents ¶
func (p MaxOneRow) Parents() []Plan
Parents implements Plan Parents interface.
func (*MaxOneRow) PredicatePushDown ¶
func (p *MaxOneRow) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*MaxOneRow) PruneColumns ¶
func (p *MaxOneRow) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (MaxOneRow) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (MaxOneRow) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (MaxOneRow) ResolveIndices ¶
func (p MaxOneRow) ResolveIndices()
ResolveIndices implements Plan interface.
func (MaxOneRow) Schema ¶
func (p MaxOneRow) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (MaxOneRow) SetChildren ¶
func (p MaxOneRow) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (MaxOneRow) SetParents ¶
func (p MaxOneRow) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (MaxOneRow) SetSchema ¶
func (p MaxOneRow) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalAggregation ¶
type PhysicalAggregation struct { HasGby bool AggType AggregationType AggFuncs []aggregation.Aggregation GroupByItems []expression.Expression // contains filtered or unexported fields }
PhysicalAggregation is Aggregation's physical plan.
func (PhysicalAggregation) AddChild ¶
func (p PhysicalAggregation) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalAggregation) AddParent ¶
func (p PhysicalAggregation) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalAggregation) Children ¶
func (p PhysicalAggregation) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalAggregation) Copy ¶
func (p *PhysicalAggregation) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalAggregation) ExplainInfo ¶
func (p *PhysicalAggregation) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (PhysicalAggregation) ID ¶
func (p PhysicalAggregation) ID() int
ID implements Plan ID interface.
func (*PhysicalAggregation) MarshalJSON ¶
func (p *PhysicalAggregation) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
func (PhysicalAggregation) Parents ¶
func (p PhysicalAggregation) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalAggregation) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalAggregation) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalAggregation) ResolveIndices ¶
func (p *PhysicalAggregation) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalAggregation) Schema ¶
func (p PhysicalAggregation) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalAggregation) SetChildren ¶
func (p PhysicalAggregation) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalAggregation) SetParents ¶
func (p PhysicalAggregation) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalAggregation) SetSchema ¶
func (p PhysicalAggregation) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalApply ¶
type PhysicalApply struct { PhysicalJoin PhysicalPlan OuterSchema []*expression.CorrelatedColumn // contains filtered or unexported fields }
PhysicalApply represents apply plan, only used for subquery.
func (PhysicalApply) AddChild ¶
func (p PhysicalApply) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalApply) AddParent ¶
func (p PhysicalApply) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalApply) Children ¶
func (p PhysicalApply) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalApply) Copy ¶
func (p *PhysicalApply) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalApply) ExplainInfo ¶
func (p *PhysicalApply) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (*PhysicalApply) MarshalJSON ¶
func (p *PhysicalApply) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
func (PhysicalApply) Parents ¶
func (p PhysicalApply) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalApply) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalApply) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalApply) ResolveIndices ¶
func (p *PhysicalApply) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalApply) Schema ¶
func (p PhysicalApply) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalApply) SetChildren ¶
func (p PhysicalApply) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalApply) SetParents ¶
func (p PhysicalApply) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalApply) SetSchema ¶
func (p PhysicalApply) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalHashJoin ¶
type PhysicalHashJoin struct { JoinType JoinType EqualConditions []*expression.ScalarFunction LeftConditions []expression.Expression RightConditions []expression.Expression OtherConditions []expression.Expression SmallTable int Concurrency int DefaultValues []types.Datum // contains filtered or unexported fields }
PhysicalHashJoin represents hash join for inner/ outer join.
func (PhysicalHashJoin) AddChild ¶
func (p PhysicalHashJoin) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalHashJoin) AddParent ¶
func (p PhysicalHashJoin) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalHashJoin) Children ¶
func (p PhysicalHashJoin) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalHashJoin) Copy ¶
func (p *PhysicalHashJoin) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalHashJoin) ExplainInfo ¶
func (p *PhysicalHashJoin) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (*PhysicalHashJoin) MarshalJSON ¶
func (p *PhysicalHashJoin) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
func (PhysicalHashJoin) Parents ¶
func (p PhysicalHashJoin) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalHashJoin) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalHashJoin) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalHashJoin) ResolveIndices ¶
func (p *PhysicalHashJoin) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalHashJoin) Schema ¶
func (p PhysicalHashJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalHashJoin) SetChildren ¶
func (p PhysicalHashJoin) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalHashJoin) SetParents ¶
func (p PhysicalHashJoin) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalHashJoin) SetSchema ¶
func (p PhysicalHashJoin) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalHashSemiJoin ¶
type PhysicalHashSemiJoin struct { WithAux bool Anti bool EqualConditions []*expression.ScalarFunction LeftConditions []expression.Expression RightConditions []expression.Expression OtherConditions []expression.Expression // contains filtered or unexported fields }
PhysicalHashSemiJoin represents hash join for semi join.
func (PhysicalHashSemiJoin) AddChild ¶
func (p PhysicalHashSemiJoin) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalHashSemiJoin) AddParent ¶
func (p PhysicalHashSemiJoin) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalHashSemiJoin) Children ¶
func (p PhysicalHashSemiJoin) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalHashSemiJoin) Copy ¶
func (p *PhysicalHashSemiJoin) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalHashSemiJoin) ExplainInfo ¶
func (p *PhysicalHashSemiJoin) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (PhysicalHashSemiJoin) ID ¶
func (p PhysicalHashSemiJoin) ID() int
ID implements Plan ID interface.
func (*PhysicalHashSemiJoin) MarshalJSON ¶
func (p *PhysicalHashSemiJoin) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
func (PhysicalHashSemiJoin) Parents ¶
func (p PhysicalHashSemiJoin) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalHashSemiJoin) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalHashSemiJoin) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalHashSemiJoin) ResolveIndices ¶
func (p *PhysicalHashSemiJoin) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalHashSemiJoin) Schema ¶
func (p PhysicalHashSemiJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalHashSemiJoin) SetChildren ¶
func (p PhysicalHashSemiJoin) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalHashSemiJoin) SetParents ¶
func (p PhysicalHashSemiJoin) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalHashSemiJoin) SetSchema ¶
func (p PhysicalHashSemiJoin) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalIndexJoin ¶
type PhysicalIndexJoin struct { Outer bool OuterJoinKeys []*expression.Column InnerJoinKeys []*expression.Column LeftConditions expression.CNFExprs RightConditions expression.CNFExprs OtherConditions expression.CNFExprs OuterIndex int KeepOrder bool DefaultValues []types.Datum // contains filtered or unexported fields }
PhysicalIndexJoin represents the plan of index look up join.
func (PhysicalIndexJoin) AddChild ¶
func (p PhysicalIndexJoin) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalIndexJoin) AddParent ¶
func (p PhysicalIndexJoin) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalIndexJoin) Children ¶
func (p PhysicalIndexJoin) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalIndexJoin) Copy ¶
func (p *PhysicalIndexJoin) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalIndexJoin) ExplainInfo ¶
func (p *PhysicalIndexJoin) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (PhysicalIndexJoin) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (PhysicalIndexJoin) Parents ¶
func (p PhysicalIndexJoin) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalIndexJoin) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalIndexJoin) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalIndexJoin) ResolveIndices ¶
func (p *PhysicalIndexJoin) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalIndexJoin) Schema ¶
func (p PhysicalIndexJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalIndexJoin) SetChildren ¶
func (p PhysicalIndexJoin) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalIndexJoin) SetParents ¶
func (p PhysicalIndexJoin) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalIndexJoin) SetSchema ¶
func (p PhysicalIndexJoin) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalIndexLookUpReader ¶
type PhysicalIndexLookUpReader struct { // IndexPlans flats the indexPlan to construct executor pb. IndexPlans []PhysicalPlan // TablePlans flats the tablePlan to construct executor pb. TablePlans []PhysicalPlan // NeedColHandle is used in execution phase. NeedColHandle bool // contains filtered or unexported fields }
PhysicalIndexLookUpReader is the index look up reader in tidb. It's used in case of double reading.
func (PhysicalIndexLookUpReader) AddChild ¶
func (p PhysicalIndexLookUpReader) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalIndexLookUpReader) AddParent ¶
func (p PhysicalIndexLookUpReader) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalIndexLookUpReader) Allocator ¶
func (p PhysicalIndexLookUpReader) Allocator() *idAllocator
func (PhysicalIndexLookUpReader) Children ¶
func (p PhysicalIndexLookUpReader) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalIndexLookUpReader) Copy ¶
func (p *PhysicalIndexLookUpReader) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalIndexLookUpReader) ExplainInfo ¶
func (p *PhysicalIndexLookUpReader) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (PhysicalIndexLookUpReader) ID ¶
func (p PhysicalIndexLookUpReader) ID() int
ID implements Plan ID interface.
func (PhysicalIndexLookUpReader) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (PhysicalIndexLookUpReader) Parents ¶
func (p PhysicalIndexLookUpReader) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalIndexLookUpReader) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalIndexLookUpReader) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalIndexLookUpReader) ResolveIndices ¶
func (p *PhysicalIndexLookUpReader) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalIndexLookUpReader) Schema ¶
func (p PhysicalIndexLookUpReader) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalIndexLookUpReader) SetChildren ¶
func (p PhysicalIndexLookUpReader) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalIndexLookUpReader) SetParents ¶
func (p PhysicalIndexLookUpReader) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalIndexLookUpReader) SetSchema ¶
func (p PhysicalIndexLookUpReader) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalIndexReader ¶
type PhysicalIndexReader struct { // IndexPlans flats the indexPlan to construct executor pb. IndexPlans []PhysicalPlan // OutputColumns represents the columns that index reader should return. OutputColumns []*expression.Column // NeedColHandle is used in execution phase. NeedColHandle bool // contains filtered or unexported fields }
PhysicalIndexReader is the index reader in tidb.
func (PhysicalIndexReader) AddChild ¶
func (p PhysicalIndexReader) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalIndexReader) AddParent ¶
func (p PhysicalIndexReader) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalIndexReader) Children ¶
func (p PhysicalIndexReader) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalIndexReader) Copy ¶
func (p *PhysicalIndexReader) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalIndexReader) ExplainInfo ¶
func (p *PhysicalIndexReader) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (PhysicalIndexReader) ID ¶
func (p PhysicalIndexReader) ID() int
ID implements Plan ID interface.
func (PhysicalIndexReader) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (PhysicalIndexReader) Parents ¶
func (p PhysicalIndexReader) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalIndexReader) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalIndexReader) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalIndexReader) ResolveIndices ¶
func (p *PhysicalIndexReader) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalIndexReader) Schema ¶
func (p PhysicalIndexReader) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalIndexReader) SetChildren ¶
func (p PhysicalIndexReader) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalIndexReader) SetParents ¶
func (p PhysicalIndexReader) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalIndexReader) SetSchema ¶
func (p PhysicalIndexReader) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalIndexScan ¶
type PhysicalIndexScan struct { Table *model.TableInfo Index *model.IndexInfo Ranges []*types.IndexRange Columns []*model.ColumnInfo DBName model.CIStr Desc bool OutOfOrder bool // DoubleRead means if the index executor will read kv two times. // If the query requires the columns that don't belong to index, DoubleRead will be true. DoubleRead bool TableAsName *model.CIStr // contains filtered or unexported fields }
PhysicalIndexScan represents an index scan plan.
func (*PhysicalIndexScan) Copy ¶
func (p *PhysicalIndexScan) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalIndexScan) ExplainInfo ¶
func (p *PhysicalIndexScan) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (*PhysicalIndexScan) IsPointGetByUniqueKey ¶
func (p *PhysicalIndexScan) IsPointGetByUniqueKey(sc *variable.StatementContext) bool
IsPointGetByUniqueKey checks whether is a point get by unique key.
func (*PhysicalIndexScan) MarshalJSON ¶
func (p *PhysicalIndexScan) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
type PhysicalMemTable ¶
type PhysicalMemTable struct { DBName model.CIStr Table *model.TableInfo Columns []*model.ColumnInfo Ranges []types.IntColumnRange TableAsName *model.CIStr // NeedColHandle is used in execution phase. NeedColHandle bool // contains filtered or unexported fields }
PhysicalMemTable reads memory table.
func (PhysicalMemTable) AddChild ¶
func (p PhysicalMemTable) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalMemTable) AddParent ¶
func (p PhysicalMemTable) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalMemTable) Children ¶
func (p PhysicalMemTable) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalMemTable) Copy ¶
func (p *PhysicalMemTable) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalMemTable) ExplainInfo ¶
func (bp *PhysicalMemTable) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (*PhysicalMemTable) MarshalJSON ¶
func (p *PhysicalMemTable) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
func (PhysicalMemTable) Parents ¶
func (p PhysicalMemTable) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalMemTable) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalMemTable) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (PhysicalMemTable) ResolveIndices ¶
func (p PhysicalMemTable) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalMemTable) Schema ¶
func (p PhysicalMemTable) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalMemTable) SetChildren ¶
func (p PhysicalMemTable) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalMemTable) SetParents ¶
func (p PhysicalMemTable) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalMemTable) SetSchema ¶
func (p PhysicalMemTable) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalMergeJoin ¶
type PhysicalMergeJoin struct { JoinType JoinType EqualConditions []*expression.ScalarFunction LeftConditions []expression.Expression RightConditions []expression.Expression OtherConditions []expression.Expression DefaultValues []types.Datum Desc bool // contains filtered or unexported fields }
PhysicalMergeJoin represents merge join for inner/ outer join.
func (PhysicalMergeJoin) AddChild ¶
func (p PhysicalMergeJoin) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalMergeJoin) AddParent ¶
func (p PhysicalMergeJoin) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalMergeJoin) Children ¶
func (p PhysicalMergeJoin) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalMergeJoin) Copy ¶
func (p *PhysicalMergeJoin) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalMergeJoin) ExplainInfo ¶
func (p *PhysicalMergeJoin) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (*PhysicalMergeJoin) MarshalJSON ¶
func (p *PhysicalMergeJoin) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
func (PhysicalMergeJoin) Parents ¶
func (p PhysicalMergeJoin) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalMergeJoin) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalMergeJoin) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalMergeJoin) ResolveIndices ¶
func (p *PhysicalMergeJoin) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalMergeJoin) Schema ¶
func (p PhysicalMergeJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalMergeJoin) SetChildren ¶
func (p PhysicalMergeJoin) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalMergeJoin) SetParents ¶
func (p PhysicalMergeJoin) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalMergeJoin) SetSchema ¶
func (p PhysicalMergeJoin) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalPlan ¶
type PhysicalPlan interface { json.Marshaler Plan // Copy copies the current plan. Copy() PhysicalPlan // ToPB converts physical plan to tipb executor. ToPB(ctx context.Context) (*tipb.Executor, error) // ExplainInfo returns operator information to be explained. ExplainInfo() string // contains filtered or unexported methods }
PhysicalPlan is a tree of the physical operators.
type PhysicalTableReader ¶
type PhysicalTableReader struct { // TablePlans flats the tablePlan to construct executor pb. TablePlans []PhysicalPlan // NeedColHandle is used in execution phase. NeedColHandle bool // contains filtered or unexported fields }
PhysicalTableReader is the table reader in tidb.
func (PhysicalTableReader) AddChild ¶
func (p PhysicalTableReader) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalTableReader) AddParent ¶
func (p PhysicalTableReader) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalTableReader) Children ¶
func (p PhysicalTableReader) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalTableReader) Copy ¶
func (p *PhysicalTableReader) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalTableReader) ExplainInfo ¶
func (p *PhysicalTableReader) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (PhysicalTableReader) ID ¶
func (p PhysicalTableReader) ID() int
ID implements Plan ID interface.
func (PhysicalTableReader) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (PhysicalTableReader) Parents ¶
func (p PhysicalTableReader) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalTableReader) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalTableReader) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalTableReader) ResolveIndices ¶
func (p *PhysicalTableReader) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalTableReader) Schema ¶
func (p PhysicalTableReader) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalTableReader) SetChildren ¶
func (p PhysicalTableReader) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalTableReader) SetParents ¶
func (p PhysicalTableReader) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalTableReader) SetSchema ¶
func (p PhysicalTableReader) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalTableScan ¶
type PhysicalTableScan struct { Table *model.TableInfo Columns []*model.ColumnInfo DBName model.CIStr Desc bool Ranges []types.IntColumnRange TableAsName *model.CIStr // KeepOrder is true, if sort data by scanning pkcol, KeepOrder bool // contains filtered or unexported fields }
PhysicalTableScan represents a table scan plan.
func (*PhysicalTableScan) Copy ¶
func (p *PhysicalTableScan) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalTableScan) ExplainInfo ¶
func (p *PhysicalTableScan) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (*PhysicalTableScan) MarshalJSON ¶
func (p *PhysicalTableScan) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
type PhysicalUnionScan ¶
type PhysicalUnionScan struct { NeedColHandle bool Conditions []expression.Expression // contains filtered or unexported fields }
PhysicalUnionScan represents a union scan operator.
func (PhysicalUnionScan) AddChild ¶
func (p PhysicalUnionScan) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (PhysicalUnionScan) AddParent ¶
func (p PhysicalUnionScan) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (PhysicalUnionScan) Children ¶
func (p PhysicalUnionScan) Children() []Plan
Children implements Plan Children interface.
func (*PhysicalUnionScan) Copy ¶
func (p *PhysicalUnionScan) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*PhysicalUnionScan) ExplainInfo ¶
func (p *PhysicalUnionScan) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (PhysicalUnionScan) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (PhysicalUnionScan) Parents ¶
func (p PhysicalUnionScan) Parents() []Plan
Parents implements Plan Parents interface.
func (PhysicalUnionScan) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (PhysicalUnionScan) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*PhysicalUnionScan) ResolveIndices ¶
func (p *PhysicalUnionScan) ResolveIndices()
ResolveIndices implements Plan interface.
func (PhysicalUnionScan) Schema ¶
func (p PhysicalUnionScan) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalUnionScan) SetChildren ¶
func (p PhysicalUnionScan) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (PhysicalUnionScan) SetParents ¶
func (p PhysicalUnionScan) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (PhysicalUnionScan) SetSchema ¶
func (p PhysicalUnionScan) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Plan ¶
type Plan interface { // AddParent means appending a parent for plan. AddParent(parent Plan) // AddChild means appending a child for plan. AddChild(children Plan) // ReplaceParent means replacing a parent with another one. ReplaceParent(parent, newPar Plan) error // ReplaceChild means replacing a child with another one. ReplaceChild(children, newChild Plan) error // Get all the parents. Parents() []Plan // Get all the children. Children() []Plan // Set the schema. SetSchema(schema *expression.Schema) // Get the schema. Schema() *expression.Schema // Get the ID. ID() int // Get the ID in explain statement ExplainID() string // Get id allocator Allocator() *idAllocator // SetParents sets the parents for the plan. SetParents(...Plan) // SetChildren sets the children for the plan. SetChildren(...Plan) // ResolveIndices resolves the indices for columns. After doing this, the columns can evaluate the rows by their indices. ResolveIndices() // contains filtered or unexported methods }
Plan is the description of an execution flow. It is created from ast.Node first, then optimized by the optimizer, finally used by the executor to create a Cursor which executes the statement.
func BuildLogicalPlan ¶
func BuildLogicalPlan(ctx context.Context, node ast.Node, is infoschema.InfoSchema) (Plan, error)
BuildLogicalPlan is exported and only used for test.
func Optimize ¶
func Optimize(ctx context.Context, node ast.Node, is infoschema.InfoSchema) (Plan, error)
Optimize does optimization and creates a Plan. The node must be prepared first.
type Prepare ¶
Prepare represents prepare plan.
func (*Prepare) AddChild ¶
func (p *Prepare) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*Prepare) AddParent ¶
func (p *Prepare) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Prepare) Children ¶
func (p *Prepare) Children() []Plan
Children implements Plan Children interface.
func (*Prepare) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Prepare) Parents ¶
func (p *Prepare) Parents() []Plan
Parents implements Plan Parents interface.
func (*Prepare) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*Prepare) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Prepare) ResolveIndices ¶
func (p *Prepare) ResolveIndices()
ResolveIndices implements Plan interface.
func (*Prepare) Schema ¶
func (p *Prepare) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Prepare) SetChildren ¶
func (p *Prepare) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*Prepare) SetParents ¶
func (p *Prepare) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*Prepare) SetSchema ¶
func (p *Prepare) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Projection ¶
type Projection struct { Exprs []expression.Expression // contains filtered or unexported fields }
Projection represents a select fields plan.
func (Projection) AddChild ¶
func (p Projection) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Projection) AddParent ¶
func (p Projection) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Projection) Children ¶
func (p Projection) Children() []Plan
Children implements Plan Children interface.
func (*Projection) Copy ¶
func (p *Projection) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Projection) ExplainInfo ¶
func (p *Projection) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (*Projection) MarshalJSON ¶
func (p *Projection) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
func (Projection) Parents ¶
func (p Projection) Parents() []Plan
Parents implements Plan Parents interface.
func (*Projection) PredicatePushDown ¶
func (p *Projection) PredicatePushDown(predicates []expression.Expression) (ret []expression.Expression, retPlan LogicalPlan, err error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*Projection) PruneColumns ¶
func (p *Projection) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface. If any expression has SetVar functions, we do not prune it.
func (Projection) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Projection) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Projection) ResolveIndices ¶
func (p *Projection) ResolveIndices()
ResolveIndices implements Plan interface.
func (Projection) Schema ¶
func (p Projection) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Projection) SetChildren ¶
func (p Projection) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Projection) SetParents ¶
func (p Projection) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Projection) SetSchema ¶
func (p Projection) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type SelectLock ¶
type SelectLock struct { Lock ast.SelectLockType // contains filtered or unexported fields }
SelectLock represents a select lock plan.
func (SelectLock) AddChild ¶
func (p SelectLock) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (SelectLock) AddParent ¶
func (p SelectLock) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (SelectLock) Children ¶
func (p SelectLock) Children() []Plan
Children implements Plan Children interface.
func (*SelectLock) Copy ¶
func (p *SelectLock) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*SelectLock) ExplainInfo ¶
func (p *SelectLock) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (SelectLock) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (SelectLock) Parents ¶
func (p SelectLock) Parents() []Plan
Parents implements Plan Parents interface.
func (*SelectLock) PredicatePushDown ¶
func (p *SelectLock) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan interface.
func (*SelectLock) PruneColumns ¶
func (p *SelectLock) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (SelectLock) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (SelectLock) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (SelectLock) ResolveIndices ¶
func (p SelectLock) ResolveIndices()
ResolveIndices implements Plan interface.
func (SelectLock) Schema ¶
func (p SelectLock) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (SelectLock) SetChildren ¶
func (p SelectLock) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (SelectLock) SetParents ¶
func (p SelectLock) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (SelectLock) SetSchema ¶
func (p SelectLock) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Selection ¶
type Selection 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 // If ScanController is true, then the child of this selection is a scan, // which use pk or index. we will record the accessConditions, idxConditions, // and tblConditions to control the below plan. ScanController bool // contains filtered or unexported fields }
Selection means a filter.
func (Selection) AddChild ¶
func (p Selection) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Selection) AddParent ¶
func (p Selection) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Selection) Children ¶
func (p Selection) Children() []Plan
Children implements Plan Children interface.
func (*Selection) Copy ¶
func (p *Selection) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Selection) ExplainInfo ¶
ExplainInfo implements PhysicalPlan interface.
func (*Selection) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (Selection) Parents ¶
func (p Selection) Parents() []Plan
Parents implements Plan Parents interface.
func (*Selection) PredicatePushDown ¶
func (p *Selection) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*Selection) PruneColumns ¶
func (p *Selection) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Selection) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Selection) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Selection) ResolveIndices ¶
func (p *Selection) ResolveIndices()
ResolveIndices implements Plan interface.
func (Selection) Schema ¶
func (p Selection) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Selection) SetChildren ¶
func (p Selection) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Selection) SetParents ¶
func (p Selection) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Selection) SetSchema ¶
func (p Selection) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Set ¶
type Set struct { VarAssigns []*expression.VarAssignment // contains filtered or unexported fields }
Set represents a plan for set stmt.
func (*Set) AddChild ¶
func (p *Set) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*Set) AddParent ¶
func (p *Set) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Set) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Set) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*Set) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Set) ResolveIndices ¶
func (p *Set) ResolveIndices()
ResolveIndices implements Plan interface.
func (*Set) Schema ¶
func (p *Set) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Set) SetChildren ¶
func (p *Set) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*Set) SetParents ¶
func (p *Set) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*Set) SetSchema ¶
func (p *Set) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Show ¶
type Show struct { Tp ast.ShowStmtType // Databases/Tables/Columns/.... DBName string Table *ast.TableName // Used for showing columns. Column *ast.ColumnName // Used for `desc table column`. Flag int // Some flag parsed from sql, such as FULL. Full bool User *auth.UserIdentity // Used for show grants. // Used by show variables GlobalScope bool // contains filtered or unexported fields }
Show represents a show plan.
func (Show) AddChild ¶
func (p Show) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Show) AddParent ¶
func (p Show) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Show) Copy ¶
func (p *Show) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Show) ExplainInfo ¶
func (bp *Show) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (Show) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Show) PredicatePushDown ¶
func (p *Show) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan interface.
func (*Show) PruneColumns ¶
func (p *Show) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Show) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Show) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (Show) ResolveIndices ¶
func (p Show) ResolveIndices()
ResolveIndices implements Plan interface.
func (Show) Schema ¶
func (p Show) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Show) SetChildren ¶
func (p Show) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Show) SetParents ¶
func (p Show) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Show) SetSchema ¶
func (p Show) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type ShowDDL ¶
type ShowDDL struct {
// contains filtered or unexported fields
}
ShowDDL is for showing DDL information.
func (*ShowDDL) AddChild ¶
func (p *ShowDDL) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*ShowDDL) AddParent ¶
func (p *ShowDDL) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*ShowDDL) Children ¶
func (p *ShowDDL) Children() []Plan
Children implements Plan Children interface.
func (*ShowDDL) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*ShowDDL) Parents ¶
func (p *ShowDDL) Parents() []Plan
Parents implements Plan Parents interface.
func (*ShowDDL) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*ShowDDL) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*ShowDDL) ResolveIndices ¶
func (p *ShowDDL) ResolveIndices()
ResolveIndices implements Plan interface.
func (*ShowDDL) Schema ¶
func (p *ShowDDL) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*ShowDDL) SetChildren ¶
func (p *ShowDDL) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*ShowDDL) SetParents ¶
func (p *ShowDDL) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*ShowDDL) SetSchema ¶
func (p *ShowDDL) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type ShowDDLJobs ¶
type ShowDDLJobs struct {
// contains filtered or unexported fields
}
ShowDDLJobs is for showing DDL job list.
func (*ShowDDLJobs) AddChild ¶
func (p *ShowDDLJobs) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*ShowDDLJobs) AddParent ¶
func (p *ShowDDLJobs) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*ShowDDLJobs) Children ¶
func (p *ShowDDLJobs) Children() []Plan
Children implements Plan Children interface.
func (*ShowDDLJobs) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*ShowDDLJobs) Parents ¶
func (p *ShowDDLJobs) Parents() []Plan
Parents implements Plan Parents interface.
func (*ShowDDLJobs) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*ShowDDLJobs) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*ShowDDLJobs) ResolveIndices ¶
func (p *ShowDDLJobs) ResolveIndices()
ResolveIndices implements Plan interface.
func (*ShowDDLJobs) Schema ¶
func (p *ShowDDLJobs) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*ShowDDLJobs) SetChildren ¶
func (p *ShowDDLJobs) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*ShowDDLJobs) SetParents ¶
func (p *ShowDDLJobs) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*ShowDDLJobs) SetSchema ¶
func (p *ShowDDLJobs) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Simple ¶
Simple represents a simple statement plan which doesn't need any optimization.
func (*Simple) AddChild ¶
func (p *Simple) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (*Simple) AddParent ¶
func (p *Simple) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Simple) Children ¶
func (p *Simple) Children() []Plan
Children implements Plan Children interface.
func (*Simple) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Simple) Parents ¶
func (p *Simple) Parents() []Plan
Parents implements Plan Parents interface.
func (*Simple) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (*Simple) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Simple) ResolveIndices ¶
func (p *Simple) ResolveIndices()
ResolveIndices implements Plan interface.
func (*Simple) Schema ¶
func (p *Simple) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Simple) SetChildren ¶
func (p *Simple) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (*Simple) SetParents ¶
func (p *Simple) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (*Simple) SetSchema ¶
func (p *Simple) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Sort ¶
type Sort struct { ByItems []*ByItems ExecLimit *Limit // no longer be used by new plan // contains filtered or unexported fields }
Sort stands for the order by plan.
func (Sort) AddChild ¶
func (p Sort) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Sort) AddParent ¶
func (p Sort) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*Sort) Copy ¶
func (p *Sort) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Sort) ExplainInfo ¶
ExplainInfo implements PhysicalPlan interface.
func (*Sort) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Sort) PredicatePushDown ¶
func (p *Sort) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan interface.
func (*Sort) PruneColumns ¶
func (p *Sort) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Sort) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Sort) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Sort) ResolveIndices ¶
func (p *Sort) ResolveIndices()
ResolveIndices implements Plan interface.
func (Sort) Schema ¶
func (p Sort) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Sort) SetChildren ¶
func (p Sort) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Sort) SetParents ¶
func (p Sort) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Sort) SetSchema ¶
func (p Sort) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type TableDual ¶
type TableDual struct { RowCount int // contains filtered or unexported fields }
TableDual represents a dual table plan.
func (TableDual) AddChild ¶
func (p TableDual) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (TableDual) AddParent ¶
func (p TableDual) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (TableDual) Children ¶
func (p TableDual) Children() []Plan
Children implements Plan Children interface.
func (*TableDual) Copy ¶
func (p *TableDual) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*TableDual) ExplainInfo ¶
ExplainInfo implements PhysicalPlan interface.
func (TableDual) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (TableDual) Parents ¶
func (p TableDual) Parents() []Plan
Parents implements Plan Parents interface.
func (*TableDual) PredicatePushDown ¶
func (p *TableDual) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*TableDual) PruneColumns ¶
func (p *TableDual) PruneColumns(_ []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (TableDual) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (TableDual) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (TableDual) ResolveIndices ¶
func (p TableDual) ResolveIndices()
ResolveIndices implements Plan interface.
func (TableDual) Schema ¶
func (p TableDual) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (TableDual) SetChildren ¶
func (p TableDual) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (TableDual) SetParents ¶
func (p TableDual) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (TableDual) SetSchema ¶
func (p TableDual) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type TopN ¶
type TopN struct { ByItems []*ByItems Offset uint64 Count uint64 // contains filtered or unexported fields }
TopN represents a top-n plan.
func (TopN) AddChild ¶
func (p TopN) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (TopN) AddParent ¶
func (p TopN) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (*TopN) Copy ¶
func (p *TopN) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*TopN) ExplainInfo ¶
func (bp *TopN) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (TopN) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*TopN) PredicatePushDown ¶
func (p *TopN) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan interface.
func (*TopN) PruneColumns ¶
func (p *TopN) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (TopN) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (TopN) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*TopN) ResolveIndices ¶
func (p *TopN) ResolveIndices()
ResolveIndices implements Plan interface.
func (TopN) Schema ¶
func (p TopN) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (TopN) SetChildren ¶
func (p TopN) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (TopN) SetParents ¶
func (p TopN) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (TopN) SetSchema ¶
func (p TopN) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Union ¶
type Union struct {
// contains filtered or unexported fields
}
Union represents Union plan.
func (Union) AddChild ¶
func (p Union) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Union) AddParent ¶
func (p Union) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Union) Children ¶
func (p Union) Children() []Plan
Children implements Plan Children interface.
func (*Union) Copy ¶
func (p *Union) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Union) ExplainInfo ¶
func (bp *Union) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (Union) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Union) PredicatePushDown ¶
func (p *Union) PredicatePushDown(predicates []expression.Expression) (ret []expression.Expression, retPlan LogicalPlan, err error)
PredicatePushDown implements LogicalPlan PredicatePushDown interface.
func (*Union) PruneColumns ¶
func (p *Union) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Union) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Union) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (Union) ResolveIndices ¶
func (p Union) ResolveIndices()
ResolveIndices implements Plan interface.
func (Union) Schema ¶
func (p Union) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Union) SetChildren ¶
func (p Union) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Union) SetParents ¶
func (p Union) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Union) SetSchema ¶
func (p Union) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Update ¶
type Update struct { OrderedList []*expression.Assignment IgnoreErr bool // contains filtered or unexported fields }
Update represents Update plan.
func (Update) AddChild ¶
func (p Update) AddChild(child Plan)
AddChild implements Plan AddChild interface.
func (Update) AddParent ¶
func (p Update) AddParent(parent Plan)
AddParent implements Plan AddParent interface.
func (Update) Children ¶
func (p Update) Children() []Plan
Children implements Plan Children interface.
func (*Update) Copy ¶
func (p *Update) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (*Update) ExplainInfo ¶
func (bp *Update) ExplainInfo() string
ExplainInfo implements PhysicalPlan interface.
func (Update) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Update) PredicatePushDown ¶
func (p *Update) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan interface.
func (*Update) PruneColumns ¶
func (p *Update) PruneColumns(parentUsedCols []*expression.Column)
PruneColumns implements LogicalPlan interface.
func (Update) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Update) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Update) ResolveIndices ¶
func (p *Update) ResolveIndices()
ResolveIndices implements Plan interface.
func (Update) Schema ¶
func (p Update) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Update) SetChildren ¶
func (p Update) SetChildren(children ...Plan)
SetChildren implements Plan SetChildren interface.
func (Update) SetParents ¶
func (p Update) SetParents(pars ...Plan)
SetParents implements Plan SetParents interface.
func (Update) SetSchema ¶
func (p Update) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
Source Files ¶
- aggregation_push_down.go
- build_key_info.go
- cacheable_checker.go
- column_pruning.go
- decorrelate.go
- eliminate_projection.go
- explain.go
- expression_rewriter.go
- initialize.go
- join_reorder.go
- logical_plan_builder.go
- logical_plans.go
- match_property.go
- new_physical_plan_builder.go
- optimizer.go
- physical_plan_builder.go
- physical_plans.go
- plan.go
- plan_to_pb.go
- planbuilder.go
- plans.go
- predicate_push_down.go
- preprocess.go
- property_cols_prune.go
- resolve_indices.go
- resolver.go
- stats.go
- stringer.go
- task.go
- topn_push_down.go
- util.go
- validator.go