[bug](decimal) Use max value as result if overflow (#23602)
* [bug](decimal) Use max value as result if overflow * update
This commit is contained in:
@ -459,7 +459,7 @@ private:
|
||||
NativeResultType res;
|
||||
// TODO handle overflow gracefully
|
||||
if (Op::template apply<NativeResultType>(a, b, res)) {
|
||||
res = max_decimal_value<ResultType>();
|
||||
res = type_limit<ResultType>::max();
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
@ -499,7 +499,7 @@ private:
|
||||
// TODO handle overflow gracefully
|
||||
if (overflow) {
|
||||
LOG(WARNING) << "Decimal math overflow";
|
||||
res = max_decimal_value<ResultType>();
|
||||
res = type_limit<ResultType>::max();
|
||||
}
|
||||
} else {
|
||||
res = apply(a, b);
|
||||
|
||||
Reference in New Issue
Block a user