Add x and y, caller has ensured there can be no overflow.
| 58 | |
| 59 | /// Add x and y, caller has ensured there can be no overflow. |
| 60 | static BasicDecimal128 AddNoOverflow(const BasicDecimalScalar128& x, |
| 61 | const BasicDecimalScalar128& y, int32_t out_scale) { |
| 62 | auto higher_scale = std::max(x.scale(), y.scale()); |
| 63 | auto sum = AddFastPath(x, y, out_scale); |
| 64 | return CheckAndReduceScale(sum, higher_scale - out_scale); |
| 65 | } |
| 66 | |
| 67 | /// Both x_value and y_value must be >= 0 |
| 68 | static BasicDecimal128 AddLargePositive(const BasicDecimalScalar128& x, |
no test coverage detected