yiguolei commented on code in PR #34825:
URL: https://github.com/apache/doris/pull/34825#discussion_r1599517312
##########
be/src/vec/common/arithmetic_overflow.h:
##########
@@ -123,7 +123,7 @@ inline bool mul_overflow(__int128 x, __int128 y, __int128&
res) {
unsigned __int128 a = (x > 0) ? x : -x;
unsigned __int128 b = (y > 0) ? y : -y;
- return (a * b) / b != a;
+ return ((a * b) / b != a) || (x > 0 && y > 0 && res < 0) || (x < 0 && y <
0 && res < 0);
Review Comment:
add some regression test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]