Skip to content
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

The result of decimal divide won't round at some precision. #6462

Closed
LittleFall opened this issue Dec 8, 2022 · 0 comments · Fixed by #6471
Closed

The result of decimal divide won't round at some precision. #6462

LittleFall opened this issue Dec 8, 2022 · 0 comments · Fixed by #6471

Comments

@LittleFall
Copy link
Contributor

LittleFall commented Dec 8, 2022

Bug Report

1. Minimal reproduce step (Required)

drop table ish;
create table ish(a decimal(4,0), b decimal(40, 20));
alter table ish set tiflash replica 1;
insert into ish values (1, 10001);

set tidb_enforce_mpp=1;
select a/b from ish;

2. What did you expect to see? (Required)

+--------+
| a/b    |
+--------+
| 0.0001 |
+--------+

3. What did you see instead (Required)

+--------+
| a/b    |
+--------+
| 0.0000 |
+--------+

4. What is your TiFlash version? (Required)

6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants