From 3023aea3fbdf5b104ec6a0d9d758a7e2583782cf Mon Sep 17 00:00:00 2001 From: Arenatlx <314806019@qq.com> Date: Thu, 20 Jun 2024 17:10:18 +0800 Subject: [PATCH] planner: remove unnecessary pointer receiver function (#54133) ref pingcap/tidb#51664, ref pingcap/tidb#52714 --- pkg/planner/core/rule_build_key_info.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/planner/core/rule_build_key_info.go b/pkg/planner/core/rule_build_key_info.go index 8c4e98dcd9..b35d3337a0 100644 --- a/pkg/planner/core/rule_build_key_info.go +++ b/pkg/planner/core/rule_build_key_info.go @@ -77,7 +77,7 @@ func (la *LogicalAggregation) buildSelfKeyInfo(selfSchema *expression.Schema) { // If a condition is the form of (uniqueKey = constant) or (uniqueKey = Correlated column), it returns at most one row. // This function will check it. -func (*LogicalSelection) checkMaxOneRowCond(eqColIDs map[int64]struct{}, childSchema *expression.Schema) bool { +func checkMaxOneRowCond(eqColIDs map[int64]struct{}, childSchema *expression.Schema) bool { if len(eqColIDs) == 0 { return false } @@ -122,7 +122,7 @@ func (p *LogicalSelection) BuildKeyInfo(selfSchema *expression.Schema, childSche } } } - p.SetMaxOneRow(p.checkMaxOneRowCond(eqCols, childSchema[0])) + p.SetMaxOneRow(checkMaxOneRowCond(eqCols, childSchema[0])) } // BuildKeyInfo implements base.LogicalPlan BuildKeyInfo interface.