From ef616c4a4d18983d10a5125b8f6d2184c3ef4081 Mon Sep 17 00:00:00 2001 From: AilinKid <314806019@qq.com> Date: Thu, 28 Mar 2024 15:19:00 +0800 Subject: [PATCH] fix test Signed-off-by: AilinKid <314806019@qq.com> --- pkg/planner/core/optimizer.go | 2 +- pkg/planner/util/optTracer.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/planner/core/optimizer.go b/pkg/planner/core/optimizer.go index c9f5479272883..f776b34c110da 100644 --- a/pkg/planner/core/optimizer.go +++ b/pkg/planner/core/optimizer.go @@ -1165,7 +1165,7 @@ func logicalOptimize(ctx context.Context, flag uint64, logic LogicalPlan) (Logic } } - opt.RecordFinalLogicalPlan(logic.BuildPlanTrace()) + opt.RecordFinalLogicalPlan(logic.BuildPlanTrace) return logic, err } diff --git a/pkg/planner/util/optTracer.go b/pkg/planner/util/optTracer.go index e9258bec9f344..79fa275f93ff8 100644 --- a/pkg/planner/util/optTracer.go +++ b/pkg/planner/util/optTracer.go @@ -60,9 +60,9 @@ func (op *LogicalOptimizeOp) AppendStepToCurrent(id int, tp string, reason, acti } // RecordFinalLogicalPlan records the final logical plan. -func (op *LogicalOptimizeOp) RecordFinalLogicalPlan(planTrace *tracing.PlanTrace) { +func (op *LogicalOptimizeOp) RecordFinalLogicalPlan(build func() *tracing.PlanTrace) { if op == nil || op.tracer == nil { return } - op.tracer.RecordFinalLogicalPlan(planTrace) + op.tracer.RecordFinalLogicalPlan(build()) }