From 67cc542d3046a039e03dd88f62bde1f09a89416a Mon Sep 17 00:00:00 2001 From: fzzf678 <108643977+fzzf678@users.noreply.github.com> Date: Wed, 15 Mar 2023 21:29:08 +0800 Subject: [PATCH] Update plan_cache.go --- planner/core/plan_cache.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/planner/core/plan_cache.go b/planner/core/plan_cache.go index 5f987c33a9fee..76ed176ec6a12 100644 --- a/planner/core/plan_cache.go +++ b/planner/core/plan_cache.go @@ -666,9 +666,8 @@ func buildRangeForIndexScan(sctx sessionctx.Context, is *PhysicalIndexScan) (err if ranger.HasFullRange(is.Ranges, false) { // the original range is already a full-range. is.Ranges = ranger.FullRange() return - } else { - return errors.New("unexpected range for PhysicalIndexScan") } + return errors.New("unexpected range for PhysicalIndexScan") } res, err := ranger.DetachCondAndBuildRangeForIndex(sctx, is.AccessCondition, is.IdxCols, is.IdxColLens, 0)