New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
util/ranger: change BuildRange to build column/index/table range #5509
Conversation
Any benchmark result? |
LGTM |
plan/gen_physical_plans.go
Outdated
if err != nil { | ||
terror.Log(errors.Trace(err)) | ||
return nil, nil, nil | ||
} | ||
indexRanges = ranger.Ranges2NewRanges(ranges) | ||
indexRanges = ranges |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it, we can return ranges
directly.
plan/physical_plan_builder.go
Outdated
if err != nil { | ||
return nil, errors.Trace(err) | ||
} | ||
is.Ranges = ranger.Ranges2NewRanges(ranges) | ||
is.Ranges = ranges |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this line? And we can remove ranges
.
plan/physical_plan_builder.go
Outdated
if err != nil { | ||
return nil, errors.Trace(err) | ||
} | ||
ts.Ranges = ranges |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
/run-sqllogic-test |
Any benchmark result? |
See this function, it's very inefficient, always make unnecessary conversion.
https://github.com/pingcap/tidb/compare/master...tiancaiamao:build-range?expand=1#diff-9980094f65cdcbb9cd1aaaf4d9d59e35L357
@winoros @hanfei1991