Move the JSON parser from evalengine#12757
Closed
dbussink wants to merge 4 commits intovitessio:mainfrom
Closed
Conversation
This moves the JSON evalengine implementation so we can share it more across different components. Specifically vreplication wants to also use the same JSON parser so it can handle dealing with the MySQL types inside JSON objects better. It also implements the same parsing for the MySQL binary JSON format and a serialization to using SQL style functions to limit typing loss as much as possible. There's still two types that cause problems. When using `TIMESTAMP` or `BIT` types inside a JSON document it's impossible to create an SQL format compatible with those types since there's no way to create literals for those two types. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
vmg
approved these changes
Mar 29, 2023
Collaborator
vmg
left a comment
There was a problem hiding this comment.
This is just moving/renaming, nothing to review 👌
frouioui
reviewed
Mar 29, 2023
Comment on lines
+1
to
+2
| package mysql | ||
|
|
frouioui
reviewed
Mar 29, 2023
Comment on lines
+1
to
+2
| package json | ||
|
|
Signed-off-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
GuptaManan100
pushed a commit
to planetscale/vitess
that referenced
this pull request
Mar 29, 2023
* Move the JSON parser from evalengine This moves the JSON evalengine implementation so we can share it more across different components. Specifically vreplication wants to also use the same JSON parser so it can handle dealing with the MySQL types inside JSON objects better. It also implements the same parsing for the MySQL binary JSON format and a serialization to using SQL style functions to limit typing loss as much as possible. There's still two types that cause problems. When using `TIMESTAMP` or `BIT` types inside a JSON document it's impossible to create an SQL format compatible with those types since there's no way to create literals for those two types. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> * mysql: move `datetime` from `evalengine` Signed-off-by: Vicent Marti <vmg@strn.cat> * json: simplify binary parser Signed-off-by: Vicent Marti <vmg@strn.cat> * Move time parsing to avoid future import loops Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> --------- Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Signed-off-by: Vicent Marti <vmg@strn.cat> Co-authored-by: Vicent Marti <vmg@strn.cat>
Member
Author
|
Looks like this was merged but the PR not closed 😞 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This moves the JSON evalengine implementation so we can share it more across different components.
Specifically vreplication wants to also use the same JSON parser so it can handle dealing with the MySQL types inside JSON objects better.
It also implements the same parsing for the MySQL binary JSON format and a serialization to using SQL style functions to limit typing loss as much as possible.
There's still two types that cause problems. When using
TIMESTAMPorBITtypes inside a JSON document it's impossible to create an SQL format compatible with those types since there's no way to create literals for those two types.Related Issue(s)
This helps with a better fix for #12731 that handles more types correctly.
Checklist