Skip to content

Commit

Permalink
address the comment
Browse files Browse the repository at this point in the history
Signed-off-by: yisaer <[email protected]>
  • Loading branch information
Yisaer committed Nov 29, 2021
1 parent 89df62e commit 105fdb3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions planner/core/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ type Plan interface {
SelectBlockOffset() int
}

// OperatorExplainInfo is the interface for ExplainInfo
type OperatorExplainInfo interface {
// ExplainInfo returns operator information to be explained.
ExplainInfo() string
}

func enforceProperty(p *property.PhysicalProperty, tsk task, ctx sessionctx.Context) task {
if p.TaskTp == property.MppTaskType {
if mpp, ok := tsk.(*mppTask); ok && !mpp.invalid() {
Expand Down Expand Up @@ -314,7 +308,7 @@ type LogicalPlan interface {
canPushToCop(store kv.StoreType) bool

// buildLogicalPlanTrace clone necessary information from LogicalPlan
buildLogicalPlanTrace(op OperatorExplainInfo) *tracing.LogicalPlanTrace
buildLogicalPlanTrace(p Plan) *tracing.LogicalPlanTrace
}

// PhysicalPlan is a tree of the physical operators.
Expand Down Expand Up @@ -388,8 +382,8 @@ func (p *baseLogicalPlan) ExplainInfo() string {
}

// buildLogicalPlanTrace implements LogicalPlan
func (p *baseLogicalPlan) buildLogicalPlanTrace(op OperatorExplainInfo) *tracing.LogicalPlanTrace {
planTrace := &tracing.LogicalPlanTrace{ID: p.ID(), TP: p.TP(), ExplainInfo: op.ExplainInfo()}
func (p *baseLogicalPlan) buildLogicalPlanTrace(plan Plan) *tracing.LogicalPlanTrace {
planTrace := &tracing.LogicalPlanTrace{ID: p.ID(), TP: p.TP(), ExplainInfo: plan.ExplainInfo()}
for _, child := range p.Children() {
planTrace.Children = append(planTrace.Children, child.buildLogicalPlanTrace(child))
}
Expand Down

0 comments on commit 105fdb3

Please sign in to comment.