From cd6ec7764def84e87ff69f1b479a5b80549052fa Mon Sep 17 00:00:00 2001 From: yisaer Date: Fri, 26 Nov 2021 18:00:30 +0800 Subject: [PATCH] address the comment Signed-off-by: yisaer --- planner/core/rule_aggregation_elimination.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/planner/core/rule_aggregation_elimination.go b/planner/core/rule_aggregation_elimination.go index 044bcdfd91739..15a41a2d806ee 100644 --- a/planner/core/rule_aggregation_elimination.go +++ b/planner/core/rule_aggregation_elimination.go @@ -117,9 +117,6 @@ func (a *aggregationEliminateChecker) tryToEliminateDistinct(agg *LogicalAggrega } func appendAggregationEliminateTraceStep(agg *LogicalAggregation, uniqueKey expression.KeyInfo, opt *logicalOptimizeOp) { - if opt.tracer == nil { - return - } opt.appendStepToCurrent(agg.ID(), agg.TP(), fmt.Sprintf("%s is unique key", uniqueKey.String()), "aggregation eliminated to projection") @@ -127,9 +124,6 @@ func appendAggregationEliminateTraceStep(agg *LogicalAggregation, uniqueKey expr func appendDistinctEliminateTraceStep(agg *LogicalAggregation, uniqueKey expression.KeyInfo, af *aggregation.AggFuncDesc, opt *logicalOptimizeOp) { - if opt.tracer == nil { - return - } opt.appendStepToCurrent(agg.ID(), agg.TP(), fmt.Sprintf("%s is unique key", uniqueKey.String()), fmt.Sprintf("agg[%s]'s distinct eliminated", af.Name))