-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Make Field::get type-safe in debug builds #7386
Conversation
75e2e5b
to
5e2ef2b
Compare
dbms/src/Core/Field.h
Outdated
{ | ||
assert(false); | ||
Null null; | ||
return f(null); |
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.
Why we need this code? Maybe just throw an exception?
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.
Or add __buitin_unreachable?
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.
Looks like we don't need an Int128 Field at all, I'll try to remove it.
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.
Ok.
@akuzm Need to investigate tests. |
@akuzm Tests have failed. |
d5a5247
to
e335ae3
Compare
@akuzm ? |
260fd49
to
e84240b
Compare
It looks like it started to work:
|
Nope, it's the same boring thing that accounts for the most test failures -- implicit reinterpret_cast between signed and unsigned ints. Most instances of it are really OK so maybe I should just allow it. |
f26b4b7
to
004cfa9
Compare
The test are too slow now, I'll have to profile them. Will separately commit the fixes I made, without enabling the assert. |
Too slow meaning that the functional stateless tests in debug take longer to complete than integration tests, which were the longest before (not including performance tests). |
Allow silent conversion only between Int64 and UInt64.
004cfa9
to
5ed561f
Compare
Test failures are flaps or broken in master. The run time improved after rewriting the assertion, now it's about 2h:20m, the same as in master. |
Category (leave one):
Short description (up to few sentences):
Make Field methods more type-safe to find more errors.