[compile](fix) fix gcc compile error#32583
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.
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.
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.
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...