Skip to content

branch-2.1: [fix](decimal)Fix the issue where decimal multiplication produces incorrect results due to mul_overflow error #51533 #51563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 7, 2025

Cherry-picked from #51533

…orrect results due to mul_overflow error (#51533)

### What problem does this PR solve?

Previously, when multiplying -15687000000000000000000 (int128) by
11000000000000000 (int128), the mul_overflow function would incorrectly
return false (indicating no overflow)

```
mysql> select -15687.000000000000000000 * 0.011000000000000000;
+--------------------------------------------------+
| -15687.000000000000000000 * 0.011000000000000000 |
+--------------------------------------------------+
|            167.725366920938463463374607431768211 |
+--------------------------------------------------+
```
now
```
mysql> select -15687.000000000000000000 * 0.011000000000000000;
+--------------------------------------------------+
| -15687.000000000000000000 * 0.011000000000000000 |
+--------------------------------------------------+
|           -172.557000000000000000000000000000000 |
+--------------------------------------------------+
```
@github-actions github-actions bot requested a review from yiguolei as a code owner June 7, 2025 04:51
@Thearas
Copy link
Contributor

Thearas commented Jun 7, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring closed this Jun 7, 2025
@dataroaring dataroaring reopened this Jun 7, 2025
@Thearas
Copy link
Contributor

Thearas commented Jun 7, 2025

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 39.04% (10328/26457)
Line Coverage 30.03% (85792/285654)
Region Coverage 28.70% (44283/154270)
Branch Coverage 25.42% (22656/89126)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.66% (19456/26061)
Line Coverage 69.38% (196899/283810)
Region Coverage 66.94% (120204/179559)
Branch Coverage 60.03% (60485/100758)

@yiguolei yiguolei merged commit a836df5 into branch-2.1 Jun 7, 2025
18 of 20 checks passed
@github-actions github-actions bot deleted the auto-pick-51533-branch-2.1 branch June 7, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants