-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[compile](fix) fix gcc compile error #32583
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
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
run performance |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
TeamCity be ut coverage result: |
| if constexpr (ShowNull::value) { | ||
| for (size_t i = 0; i != num_rows; ++i) { | ||
| if (places[i] + offset) { | ||
| if (places[i] || offset) { |
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.
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.
place[i] is a pointer, and offset is an unsigned int, so if placces[i] != null or offset != 0, equals places[i] + offset != 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.
maybe the correct answer is like: if(places[i] && offset < places[i].size()), check offset != 0 or == 0 is strange here.
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.
here below we use places[i]+offset as an pointer. so maybe places[i] + offset != nullptr is correct and more readable
TPC-H: Total hot run time: 37259 ms |
TPC-DS: Total hot run time: 180519 ms |
Proposed changes
fcc reports error: comparing the result of pointer addition when compile
if (places[i] + offset)Issue Number: close #xxx
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...