-
Notifications
You must be signed in to change notification settings - Fork 104
Added support for XML VALUE() datatype method #3771
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
base: BABEL_5_X_DEV
Are you sure you want to change the base?
Added support for XML VALUE() datatype method #3771
Conversation
Signed-off-by: Rohit Bhagat <[email protected]>
Signed-off-by: Rohit Bhagat <[email protected]>
Pull Request Test Coverage Report for Build 15483310692Details
💛 - Coveralls |
Signed-off-by: Rohit Bhagat <[email protected]>
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.
Have we verified the case sensitivity of VALUE function with TSQL? Does VALUE, value, Value, etc. all work or there is only a particular case which is valid, if that is the case then we will have to handle that as well!
@@ -38,6 +38,7 @@ PG_KEYWORD("authorization", AUTHORIZATION, TYPE_FUNC_NAME_KEYWORD) | |||
PG_KEYWORD("auto", TSQL_AUTO, UNRESERVED_KEYWORD) | |||
PG_KEYWORD("backward", BACKWARD, UNRESERVED_KEYWORD) | |||
PG_KEYWORD("base64", TSQL_BASE64, UNRESERVED_KEYWORD) | |||
PG_KEYWORD("bbf_xmlvalue", TSQL_XML_VALUE, UNRESERVED_KEYWORD) |
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.
Category should be RESERVED_KEYWORD
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.
Updated
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.
why should it be reserved?
Signed-off-by: Rohit Bhagat <[email protected]>
Signed-off-by: Rohit Bhagat <[email protected]>
Signed-off-by: Rohit Bhagat <[email protected]>
Signed-off-by: Rohit Bhagat <[email protected]>
Description
Currently we do not support XML
VALUE()
Function. This PR adds the support for XMLVALUE()
Function.This support is added by rewriting the query as follows
Also, added PostgreSQL grammar which calls internal function
bbf_xmlvalue(xpath, xml_expression)
which uses underlying PostgreSQL functionxpath()
to get the required output, and also added a typecast on its result to get the result with type as specified in argument.Authored-by: Rohit Bhagat [email protected]
Signed-off-by: Rohit Bhagat [email protected]
Issues Resolved
BABEL-5223
Test Scenarios Covered
Use case based - YES
Boundary conditions - YES
Arbitrary inputs - YES
Negative test cases - YES
Minor version upgrade tests - YES
Major version upgrade tests - YES
Performance tests - NA
Tooling impact - NA
Client tests - NA
Check List
By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.