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

dolt diff does not handle decimal precision change #8551

Closed
liuliu-dev opened this issue Nov 12, 2024 · 1 comment · Fixed by #8554
Closed

dolt diff does not handle decimal precision change #8551

liuliu-dev opened this issue Nov 12, 2024 · 1 comment · Fixed by #8554
Assignees

Comments

@liuliu-dev
Copy link
Contributor

repro:
change the column type from decimal(10,2) to decimal(10,4):

test/main> alter table decimalchange modify column col1 decimal(10,4);
liulius-MacBook-Pro:test liuliu$ dolt commit -m "change decimal"
commit 5c8avgpcfvap0mresh4m69sf5233r20k (HEAD -> main) 
Author: liuliu <[email protected]>
Date:  Tue Nov 12 12:34:03 -0800 2024

        change decimal

dolt diff with previous commit:

liulius-MacBook-Pro:test liuliu$ dolt diff fslnepcn3k61h85e4ab9qdjnrp900a4c 5c8avgpcfvap0mresh4m69sf5233r20k

output:

diff --dolt a/decimalchange b/decimalchange
--- a/decimalchange
+++ b/decimalchange
 CREATE TABLE `decimalchange` (
   `pk` int NOT NULL,
-  `col1` decimal(10,2) NOT NULL,
+  `col1` decimal(10,4),
   PRIMARY KEY (`pk`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;
+---+----+-------+
|   | pk | col1  |
+---+----+-------+
| < | 1  | 90.94 |
| > | 1  | 90.94 |
+---+----+-------+

related issue on dolthub:
dolthub/dolthub-issues#551

@liuliu-dev liuliu-dev changed the title dolt diff does not handle decimal change dolt diff does not handle decimal precision change Nov 12, 2024
@jycor
Copy link
Contributor

jycor commented Nov 12, 2024

leftovers from this issue: #8133

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 a pull request may close this issue.

2 participants