Documentation ¶
Index ¶
- Constants
- Variables
- func BuildIndexRange(sc *variable.StatementContext, p *PhysicalIndexScan) error
- func BuildTableRange(accessConditions []expression.Expression, sc *variable.StatementContext) ([]types.IntColumnRange, error)
- func DetachIndexFilterConditions(conditions []expression.Expression, indexColumns []*model.IndexColumn, ...) ([]expression.Expression, []expression.Expression)
- func DetachIndexScanConditions(conditions []expression.Expression, index *model.IndexInfo) (accessConds []expression.Expression, filterConds []expression.Expression, ...)
- func DetachTableScanConditions(conditions []expression.Expression, table *model.TableInfo) ([]expression.Expression, []expression.Expression)
- func ExpressionsToPB(sc *variable.StatementContext, exprs []expression.Expression, client kv.Client) (pbExpr *tipb.Expr, pushed []expression.Expression, ...)
- func InferType(sc *variable.StatementContext, node ast.Node) error
- 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 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) Copy() PhysicalPlan
- func (p Analyze) ID() string
- func (p Analyze) MarshalJSON() ([]byte, error)
- func (p Analyze) Parents() []Plan
- func (p *Analyze) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
- 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) ResolveIndicesAndCorCols()
- 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 ApplyConditionChecker
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p Cache) SetChildren(children ...Plan)
- func (p Cache) SetParents(pars ...Plan)
- func (p Cache) 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) ID() string
- 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) 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) ID() string
- 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) 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalAggregation) SetChildren(children ...Plan)
- func (p PhysicalAggregation) SetParents(pars ...Plan)
- func (p PhysicalAggregation) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalApply) SetChildren(children ...Plan)
- func (p PhysicalApply) SetParents(pars ...Plan)
- func (p PhysicalApply) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalHashJoin) SetChildren(children ...Plan)
- func (p PhysicalHashJoin) SetParents(pars ...Plan)
- func (p PhysicalHashJoin) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalHashSemiJoin) SetChildren(children ...Plan)
- func (p PhysicalHashSemiJoin) SetParents(pars ...Plan)
- func (p PhysicalHashSemiJoin) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalIndexLookUpReader) SetChildren(children ...Plan)
- func (p PhysicalIndexLookUpReader) SetParents(pars ...Plan)
- func (p PhysicalIndexLookUpReader) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalIndexReader) SetChildren(children ...Plan)
- func (p PhysicalIndexReader) SetParents(pars ...Plan)
- func (p PhysicalIndexReader) SetSchema(schema *expression.Schema)
- type PhysicalIndexScan
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalMemTable) SetChildren(children ...Plan)
- func (p PhysicalMemTable) SetParents(pars ...Plan)
- func (p PhysicalMemTable) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalMergeJoin) SetChildren(children ...Plan)
- func (p PhysicalMergeJoin) SetParents(pars ...Plan)
- func (p PhysicalMergeJoin) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalTableReader) SetChildren(children ...Plan)
- func (p PhysicalTableReader) SetParents(pars ...Plan)
- func (p PhysicalTableReader) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p PhysicalUnionScan) SetChildren(children ...Plan)
- func (p PhysicalUnionScan) SetParents(pars ...Plan)
- func (p PhysicalUnionScan) SetSchema(schema *expression.Schema)
- 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) ID() string
- 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) 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) Schema() *expression.Schema
- func (p *ShowDDL) SetChildren(children ...Plan)
- func (p *ShowDDL) SetParents(pars ...Plan)
- func (p *ShowDDL) 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) ID() string
- 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) 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
- 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) ID() string
- 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) ResolveIndicesAndCorCols()
- 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)
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" // 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" // 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" // TypeAnalyze is the type of Analyze. TypeAnalyze = "Analyze" // 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 )
Optimizer error codes.
const ( CodeUnsupportedType terror.ErrCode = 1 SystemInternalError terror.ErrCode = 2 CodeAmbiguous terror.ErrCode = 1052 CodeUnknownColumn terror.ErrCode = 1054 CodeWrongArguments terror.ErrCode = 1210 )
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") )
Optimizer base errors.
var ( ErrUnsupportedType = terror.ClassOptimizerPlan.New(CodeUnsupportedType, "Unsupported type") SystemInternalErrorType = terror.ClassOptimizerPlan.New(SystemInternalError, "System internal error") ErrUnknownColumn = terror.ClassOptimizerPlan.New(CodeUnknownColumn, "Unknown column '%s' in '%s'") ErrWrongArguments = terror.ClassOptimizerPlan.New(CodeWrongArguments, "Incorrect arguments to EXECUTE") ErrAmbiguous = terror.ClassOptimizerPlan.New(CodeAmbiguous, "Column '%s' in field list is ambiguous") )
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.
var UseDAGPlanBuilder = false
UseDAGPlanBuilder means we should use new planner and dag pb.
Functions ¶
func BuildIndexRange ¶
func BuildIndexRange(sc *variable.StatementContext, p *PhysicalIndexScan) error
BuildIndexRange will build range of index for PhysicalIndexScan
func BuildTableRange ¶
func BuildTableRange(accessConditions []expression.Expression, sc *variable.StatementContext) ([]types.IntColumnRange, error)
BuildTableRange will build range of pk for PhysicalTableScan
func DetachIndexFilterConditions ¶
func DetachIndexFilterConditions(conditions []expression.Expression, indexColumns []*model.IndexColumn, table *model.TableInfo) ([]expression.Expression, []expression.Expression)
DetachIndexFilterConditions will detach the access conditions from other conditions.
func DetachIndexScanConditions ¶
func DetachIndexScanConditions(conditions []expression.Expression, index *model.IndexInfo) (accessConds []expression.Expression, filterConds []expression.Expression, accessEqualCount int, accessInAndEqCount int)
DetachIndexScanConditions will detach the index filters from table filters.
func DetachTableScanConditions ¶
func DetachTableScanConditions(conditions []expression.Expression, table *model.TableInfo) ([]expression.Expression, []expression.Expression)
DetachTableScanConditions distinguishes between access conditions and filter conditions from conditions.
func ExpressionsToPB ¶
func ExpressionsToPB(sc *variable.StatementContext, exprs []expression.Expression, client kv.Client) (pbExpr *tipb.Expr, pushed []expression.Expression, remained []expression.Expression)
ExpressionsToPB converts expression to tipb.Expr.
func InferType ¶
func InferType(sc *variable.StatementContext, node ast.Node) error
InferType infers result type for ast.ExprNode.
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.
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 )
type Analyze ¶
type Analyze struct { TableInfo *model.TableInfo IndicesInfo []*model.IndexInfo ColsInfo []*model.ColumnInfo PkInfo *model.ColumnInfo // Used only when pk is handle. // 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) Copy ¶
func (p *Analyze) Copy() PhysicalPlan
Copy implements the PhysicalPlan Copy interface.
func (Analyze) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (Analyze) Parents ¶
func (p Analyze) Parents() []Plan
Parents implements Plan Parents interface.
func (*Analyze) PredicatePushDown ¶
func (p *Analyze) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error)
PredicatePushDown implements LogicalPlan 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) ResolveIndicesAndCorCols ¶
func (p *Analyze) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Analyze) Schema ¶
func (p Analyze) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Analyze) SetChildren ¶
func (p Analyze) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Analyze) SetParents ¶
func (p Analyze) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Analyze) SetSchema ¶
func (p Analyze) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type ApplyConditionChecker ¶
type ApplyConditionChecker struct { Condition expression.Expression All bool }
ApplyConditionChecker checks whether all or any output of apply matches a condition.
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) 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) Schema ¶
func (p Cache) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Cache) SetChildren ¶
func (p Cache) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Cache) SetParents ¶
func (p Cache) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Cache) SetSchema ¶
func (p Cache) 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) Schema ¶
func (p *CheckTable) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*CheckTable) SetChildren ¶
func (p *CheckTable) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*CheckTable) SetParents ¶
func (p *CheckTable) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) Schema ¶
func (p *DDL) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*DDL) SetChildren ¶
func (p *DDL) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*DDL) SetParents ¶
func (p *DDL) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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 // 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) ResolveIndicesAndCorCols ¶
func (p *DataSource) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (DataSource) Schema ¶
func (p DataSource) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (DataSource) SetChildren ¶
func (p DataSource) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (DataSource) SetParents ¶
func (p DataSource) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (DataSource) SetSchema ¶
func (p DataSource) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
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) Schema ¶
func (p *Deallocate) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Deallocate) SetChildren ¶
func (p *Deallocate) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*Deallocate) SetParents ¶
func (p *Deallocate) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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) ResolveIndicesAndCorCols ¶
func (p *Delete) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Delete) Schema ¶
func (p Delete) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Delete) SetChildren ¶
func (p Delete) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Delete) SetParents ¶
func (p Delete) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) Schema ¶
func (p *Execute) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Execute) SetChildren ¶
func (p *Execute) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*Execute) SetParents ¶
func (p *Execute) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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) ResolveIndicesAndCorCols ¶
func (p *Exists) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Exists) Schema ¶
func (p Exists) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Exists) SetChildren ¶
func (p Exists) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Exists) SetParents ¶
func (p Exists) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Exists) SetSchema ¶
func (p Exists) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Explain ¶
type Explain struct { StmtPlan Plan // 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) Schema ¶
func (p *Explain) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Explain) SetChildren ¶
func (p *Explain) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*Explain) SetParents ¶
func (p *Explain) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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 int Ignore bool // 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) 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) ResolveIndicesAndCorCols ¶
func (p *Insert) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Insert) Schema ¶
func (p Insert) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Insert) SetChildren ¶
func (p Insert) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Insert) SetParents ¶
func (p Insert) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Insert) SetSchema ¶
func (p Insert) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
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) 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) ResolveIndicesAndCorCols ¶
func (p *Limit) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Limit) Schema ¶
func (p Limit) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Limit) SetChildren ¶
func (p Limit) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Limit) SetParents ¶
func (p Limit) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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 FieldsInfo *ast.FieldsClause LinesInfo *ast.LinesClause // 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) Schema ¶
func (p *LoadData) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*LoadData) SetChildren ¶
func (p *LoadData) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*LoadData) SetParents ¶
func (p *LoadData) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*LoadData) SetSchema ¶
func (p *LoadData) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type LogicalAggregation ¶
type LogicalAggregation struct { AggFuncs []expression.AggregationFunction 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() string
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) ResolveIndicesAndCorCols ¶
func (p *LogicalAggregation) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (LogicalAggregation) Schema ¶
func (p LogicalAggregation) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (LogicalAggregation) SetChildren ¶
func (p LogicalAggregation) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (LogicalAggregation) SetParents ¶
func (p LogicalAggregation) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) ResolveIndicesAndCorCols ¶
func (p *LogicalApply) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (LogicalApply) Schema ¶
func (p LogicalApply) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (LogicalApply) SetChildren ¶
func (p LogicalApply) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (LogicalApply) SetParents ¶
func (p LogicalApply) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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.Expression RightConditions []expression.Expression OtherConditions []expression.Expression // 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) ResolveIndicesAndCorCols ¶
func (p *LogicalJoin) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (LogicalJoin) Schema ¶
func (p LogicalJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (LogicalJoin) SetChildren ¶
func (p LogicalJoin) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (LogicalJoin) SetParents ¶
func (p LogicalJoin) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) // ResolveIndicesAndCorCols resolves the index for columns and initializes the correlated columns. ResolveIndicesAndCorCols() // 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) 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) ResolveIndicesAndCorCols ¶
func (p *MaxOneRow) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (MaxOneRow) Schema ¶
func (p MaxOneRow) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (MaxOneRow) SetChildren ¶
func (p MaxOneRow) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (MaxOneRow) SetParents ¶
func (p MaxOneRow) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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 []expression.AggregationFunction 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) ID ¶
func (p PhysicalAggregation) ID() string
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) Schema ¶
func (p PhysicalAggregation) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalAggregation) SetChildren ¶
func (p PhysicalAggregation) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalAggregation) SetParents ¶
func (p PhysicalAggregation) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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) Schema ¶
func (p PhysicalApply) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalApply) SetChildren ¶
func (p PhysicalApply) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalApply) SetParents ¶
func (p PhysicalApply) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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) Schema ¶
func (p PhysicalHashJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalHashJoin) SetChildren ¶
func (p PhysicalHashJoin) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalHashJoin) SetParents ¶
func (p PhysicalHashJoin) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) ID ¶
func (p PhysicalHashSemiJoin) ID() string
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) Schema ¶
func (p PhysicalHashSemiJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalHashSemiJoin) SetChildren ¶
func (p PhysicalHashSemiJoin) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalHashSemiJoin) SetParents ¶
func (p PhysicalHashSemiJoin) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalHashSemiJoin) SetSchema ¶
func (p PhysicalHashSemiJoin) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalIndexLookUpReader ¶
type PhysicalIndexLookUpReader struct {
// 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) ID ¶
func (p PhysicalIndexLookUpReader) ID() string
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) Schema ¶
func (p PhysicalIndexLookUpReader) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalIndexLookUpReader) SetChildren ¶
func (p PhysicalIndexLookUpReader) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalIndexLookUpReader) SetParents ¶
func (p PhysicalIndexLookUpReader) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalIndexLookUpReader) SetSchema ¶
func (p PhysicalIndexLookUpReader) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type PhysicalIndexReader ¶
type PhysicalIndexReader struct {
// 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) ID ¶
func (p PhysicalIndexReader) ID() string
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) Schema ¶
func (p PhysicalIndexReader) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalIndexReader) SetChildren ¶
func (p PhysicalIndexReader) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalIndexReader) SetParents ¶
func (p PhysicalIndexReader) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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 // 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) 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) Schema ¶
func (p PhysicalMemTable) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalMemTable) SetChildren ¶
func (p PhysicalMemTable) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalMemTable) SetParents ¶
func (p PhysicalMemTable) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) ID ¶
func (p PhysicalMergeJoin) ID() string
ID implements Plan ID 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) Schema ¶
func (p PhysicalMergeJoin) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalMergeJoin) SetChildren ¶
func (p PhysicalMergeJoin) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalMergeJoin) SetParents ¶
func (p PhysicalMergeJoin) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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 // contains filtered or unexported methods }
PhysicalPlan is a tree of the physical operators.
func EliminateProjection ¶
func EliminateProjection(p PhysicalPlan) PhysicalPlan
EliminateProjection eliminates projection operator to avoid the cost of memory copy in the iterator of projection.
type PhysicalTableReader ¶
type PhysicalTableReader struct {
// 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) ID ¶
func (p PhysicalTableReader) ID() string
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) Schema ¶
func (p PhysicalTableReader) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalTableReader) SetChildren ¶
func (p PhysicalTableReader) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalTableReader) SetParents ¶
func (p PhysicalTableReader) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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 // If sort data by scanning pkcol, KeepOrder should be true. 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) MarshalJSON ¶
func (p *PhysicalTableScan) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface.
type PhysicalUnionScan ¶
type PhysicalUnionScan struct { Condition 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) ID ¶
func (p PhysicalUnionScan) ID() string
ID implements Plan ID 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) Schema ¶
func (p PhysicalUnionScan) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (PhysicalUnionScan) SetChildren ¶
func (p PhysicalUnionScan) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (PhysicalUnionScan) SetParents ¶
func (p PhysicalUnionScan) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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() string // Get id allocator Allocator() *idAllocator // SetParents sets the parents for the plan. SetParents(...Plan) // SetParents sets the children for the plan. SetChildren(...Plan) // 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 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) Schema ¶
func (p *Prepare) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Prepare) SetChildren ¶
func (p *Prepare) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*Prepare) SetParents ¶
func (p *Prepare) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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.
func (Projection) ReplaceChild ¶
ReplaceChild means replace a child with another one.
func (Projection) ReplaceParent ¶
ReplaceParent means replace a parent for another one.
func (*Projection) ResolveIndicesAndCorCols ¶
func (p *Projection) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Projection) Schema ¶
func (p Projection) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Projection) SetChildren ¶
func (p Projection) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Projection) SetParents ¶
func (p Projection) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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) ResolveIndicesAndCorCols ¶
func (p *SelectLock) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (SelectLock) Schema ¶
func (p SelectLock) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (SelectLock) SetChildren ¶
func (p SelectLock) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (SelectLock) SetParents ¶
func (p SelectLock) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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) ResolveIndicesAndCorCols ¶
func (p *Selection) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Selection) Schema ¶
func (p Selection) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Selection) SetChildren ¶
func (p Selection) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Selection) SetParents ¶
func (p Selection) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) Schema ¶
func (p *Set) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Set) SetChildren ¶
func (p *Set) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*Set) SetParents ¶
func (p *Set) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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 string // 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) 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) ResolveIndicesAndCorCols ¶
func (p *Show) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Show) Schema ¶
func (p Show) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Show) SetChildren ¶
func (p Show) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Show) SetParents ¶
func (p Show) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) Schema ¶
func (p *ShowDDL) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*ShowDDL) SetChildren ¶
func (p *ShowDDL) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*ShowDDL) SetParents ¶
func (p *ShowDDL) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*ShowDDL) SetSchema ¶
func (p *ShowDDL) 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) Schema ¶
func (p *Simple) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (*Simple) SetChildren ¶
func (p *Simple) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*Simple) SetParents ¶
func (p *Simple) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (*Simple) SetSchema ¶
func (p *Simple) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Sort ¶
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) 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) ResolveIndicesAndCorCols ¶
func (p *Sort) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Sort) Schema ¶
func (p Sort) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Sort) SetChildren ¶
func (p Sort) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Sort) SetParents ¶
func (p Sort) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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) 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) ResolveIndicesAndCorCols ¶
func (p *TableDual) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (TableDual) Schema ¶
func (p TableDual) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (TableDual) SetChildren ¶
func (p TableDual) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (TableDual) SetParents ¶
func (p TableDual) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (TableDual) SetSchema ¶
func (p TableDual) 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) 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) ResolveIndicesAndCorCols ¶
func (p *Union) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Union) Schema ¶
func (p Union) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Union) SetChildren ¶
func (p Union) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Union) SetParents ¶
func (p Union) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Union) SetSchema ¶
func (p Union) SetSchema(schema *expression.Schema)
SetSchema implements Plan SetSchema interface.
type Update ¶
type Update struct { OrderedList []*expression.Assignment // 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) 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) ResolveIndicesAndCorCols ¶
func (p *Update) ResolveIndicesAndCorCols()
ResolveIndicesAndCorCols implements LogicalPlan interface.
func (Update) Schema ¶
func (p Update) Schema() *expression.Schema
Schema implements Plan Schema interface.
func (Update) SetChildren ¶
func (p Update) SetChildren(children ...Plan)
RemoveAllParents implements Plan RemoveAllParents interface.
func (Update) SetParents ¶
func (p Update) SetParents(pars ...Plan)
RemoveAllParents implements Plan RemoveAllParents 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
- column_pruning.go
- decorrelate.go
- eliminate_projection.go
- expr_to_pb.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
- planbuilder.go
- plans.go
- predicate_push_down.go
- preprocess.go
- range.go
- refiner.go
- resolve_indices.go
- resolver.go
- statistics_helper.go
- stringer.go
- task_profile.go
- topn_push_down.go
- typeinferer.go
- util.go
- validator.go