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 --stat -r json produces invalid JSON #7800

Closed
timsehn opened this issue Apr 30, 2024 · 1 comment · Fixed by #7810
Closed

dolt diff --stat -r json produces invalid JSON #7800

timsehn opened this issue Apr 30, 2024 · 1 comment · Fixed by #7810
Assignees
Labels
bug Something isn't working cli customer issue

Comments

@timsehn
Copy link
Contributor

timsehn commented Apr 30, 2024

dolt diff --stats -r json produces invalid JSON (schema_diff has invalid content`):

$ dolt diff b6u0b8g9crutgpaummtla6rbft91o2ue --stat -r json 
{"tables":[{"name":"cbp_apprehensions_monthly","schema_diff":[prev size: 29676, new size: 29676, adds: 0, deletes: 0, modifications: 24990
4,686 Rows Unmodified (15.79%)
0 Rows Added (0.00%)
0 Rows Deleted (0.00%)
24,990 Rows Modified (84.21%)
0 Cells Added (0.00%)
0 Cells Deleted (0.00%)
49,980 Cells Modified (24.06%)
(29,676 Row Entries vs 29,676 Row Entries)

}]}
@timsehn timsehn added bug Something isn't working cli customer issue labels Apr 30, 2024
@nicktobey nicktobey self-assigned this May 1, 2024
@nicktobey
Copy link
Contributor

dolt diff -r sql --stat also produces invalid SQL.

Honestly, dolt diff --stat is essentially a different command than dolt diff, since it doesn't actually produce a diff, only diff stats. We could define a json encoding of the diff stats, or we could just make --stat and -r mutually exclusive.

@timsehn, you labelled this as a customer issue? Does the customer want the diff stats in JSON format, or are we just looking to avoid generating invalid JSON output here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli customer issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants