-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add parsing support for JSON Utility Functions #9850
Add parsing support for JSON Utility Functions #9850
Conversation
Signed-off-by: Kushal Kumar <kushalkumargupta4@gmail.com>
…tility struct Signed-off-by: Kushal Kumar <kushalkumargupta4@gmail.com>
Signed-off-by: Kushal Kumar <kushalkumargupta4@gmail.com>
ef0a39a
to
abf9a53
Compare
Signed-off-by: Kushal Kumar <kushalkumargupta4@gmail.com>
go/vt/sqlparser/ast.go
Outdated
// JSONUtilityExpr represents set of JSON utility functions | ||
// More information on https://dev.mysql.com/doc/refman/8.0/en/json-utility-functions.html | ||
JSONUtilityExpr struct { | ||
Name ColIdent | ||
StringArg Expr | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @GuptaManan100 is right. Even though the three different utility functions (JSON_PRETTY
, JSON_STORAGE_SIZE
, JSON_STORAGE_FREE
) have the same signature, it would be more readable/debuggable to have them as separate AST nodes or have an identifiable name (such as an enum).
Signed-off-by: Kushal Kumar <kushalkumargupta4@gmail.com>
Create separate structs and format function for each struct Update parser to use corresponding structs Remove previously used JSONUtilityExpr struct Signed-off-by: Kushal Kumar <kushalkumargupta4@gmail.com>
Signed-off-by: Kushal Kumar <kushalkumargupta4@gmail.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Description
Adds the parsing support for JSON Utility functions. More information here
Changes made
Related Issue(s)
#8604
#4099
Related PR: #9352
Checklist
Deployment Notes