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

Fix global decimal.MarshalJSONWithoutQuotes overwrite #2529

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

alecsammon
Copy link
Contributor

The decimal.MarshalJSONWithoutQuotes is a global variable.

By setting this value then this can cause problems with any other code that does not expect this value to be changed.

Instead using a custom encoder to ensure that the marshalling behaviour is as expected without changing the global value ensure that this will not cause compatibility issues with other projects.

This code is covered both by existing tests, and an additional one in this PR.
(if the custom encode switch case is not added, but the global variables are, then the tests fail).

@alecsammon
Copy link
Contributor Author

alecsammon commented Jun 4, 2024

The test failure for Test Integration with Dolt and DoltgreSQL / test-integration (pull_request) I believe is unrelated to these changes - looks like the test may be pointing at a commit which has been rebased or deleted?

Or maybe just a timing issue - once main has finished building then maybe the reference will exist?

@alecsammon alecsammon force-pushed the fix_decimal_quotes branch from 4bce615 to adcbafe Compare June 4, 2024 19:26
@nicktobey nicktobey self-assigned this Jun 4, 2024
@nicktobey
Copy link
Contributor

The test failure is odd. It's a new check that we added, and my best guess is that we have some GitHub action that runs whenever a team member creates a PR, but not when someone external creates a PR.

Let me verify that.

@nicktobey
Copy link
Contributor

Alright, according to @Hydrocharged this is happening because the PR is coming from a fork: the CI action is trying to check out the change, but can't because it doesn't exist in our repo. For now, we can ignore this failure.

@nicktobey nicktobey merged commit 484b6a9 into dolthub:main Jun 4, 2024
7 of 8 checks passed
@nicktobey
Copy link
Contributor

@alecsammon Thank you so much for the contribution!

@alecsammon
Copy link
Contributor Author

Thank you!

@nicktobey
Copy link
Contributor

Let us know if you have any other issues using go-mysql-server as a library and we'll get right on it! We have a 24-hour pledge when it comes to issues.

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

Successfully merging this pull request may close these issues.

3 participants