github-actions[bot] commented on code in PR #64828:
URL: https://github.com/apache/doris/pull/64828#discussion_r3478778104
##########
be/src/exprs/function/int_div.cpp:
##########
@@ -120,6 +121,14 @@ struct DivideIntegralImpl {
std::make_shared<typename
PrimitiveTypeTraits<Type>::DataType>()};
}
+ static bool division_leads_to_fpe(Arg a, Arg b) {
Review Comment:
This guard still misses the `LARGEINT` overload.
`register_function_int_div()` registers `DivideIntegralImpl<TYPE_LARGEINT>`,
and `PrimitiveTypeTraits<TYPE_LARGEINT>::CppType` is `__int128_t`; on the
toolchains in this checkout both g++ and clang++ report
`std::is_signed_v<__int128_t> == false`. That means `division_leads_to_fpe()`
always returns false for LARGEINT, and the LARGEINT paths can still execute the
direct `a / b` division at lines 161/173 for `MIN_INT128 / -1` instead of
returning NULL like the new INT/BIGINT cases. Please make the signed predicate
Doris-aware, for example by explicitly including `std::is_same_v<Arg, Int128>`
or a local integer trait, and add a LARGEINT min/-1 unit case.
--
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]