-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
stats: fix histogram bound overflow error #8984
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8984 +/- ##
==========================================
+ Coverage 67.51% 67.55% +0.03%
==========================================
Files 363 363
Lines 75264 75270 +6
==========================================
+ Hits 50818 50851 +33
+ Misses 19949 19929 -20
+ Partials 4497 4490 -7
Continue to review full report at Codecov.
|
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-integration-common-test |
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 |
What problem does this PR solve?
When we have a table with unsigned primary key and have a query like
select count(*) from t
, the scan range of query will be[-inf, +inf]
, like a signed primary key, not[0,+inf]
(it should be another problem though). So when updating the histogram using feedback, the-inf
value will be stored intouint64
, which will overflow the histogram value ranges. Then when reading stats from a table, there will be an error message likeError occurred when read table stats for table sbtest1. The error message is [types:1690]constant 18446744071562067968 overflows int
.What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes