Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
  • Loading branch information
wjhuang2016 committed Dec 9, 2021
1 parent 464d4a6 commit c369069
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/ranger/detacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,7 @@ func ExtractEqAndInCondition(sctx sessionctx.Context, conditions []expression.Ex
mergedAccesses[offset] = accesses[offset]
points[offset] = rb.build(accesses[offset])
}
_, col := cond.CharsetAndCollation()
points[offset] = rb.intersection(points[offset], rb.build(cond), collate.GetCollator(col))
points[offset] = rb.intersection(points[offset], rb.build(cond), collate.GetCollator(cols[offset].GetType().Collate))
if len(points[offset]) == 0 { // Early termination if false expression found
if expression.MaybeOverOptimized4PlanCache(sctx, conditions) {
// cannot return an empty-range for plan-cache since the range may become non-empty as parameters change
Expand Down

0 comments on commit c369069

Please sign in to comment.