-
Notifications
You must be signed in to change notification settings - Fork 141
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 GET_FORMAT
Function To OpenSearch SQL Plugin
#1299
Add GET_FORMAT
Function To OpenSearch SQL Plugin
#1299
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1299 +/- ##
=========================================
Coverage 98.36% 98.37%
- Complexity 3643 3649 +6
=========================================
Files 343 343
Lines 9017 9041 +24
Branches 585 585
=========================================
+ Hits 8870 8894 +24
Misses 142 142
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
* @return ExprValue.. | ||
*/ | ||
private ExprValue exprGetFormat(ExprValue type, ExprValue format) { | ||
String key = type.stringValue() + "-" + format.stringValue(); |
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.
Does https://guava.dev/releases/19.0/api/docs/com/google/common/collect/Table.html solve the problem without concat the string value?
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.
docs/user/dql/functions.rst
Outdated
|
||
Argument type: TYPE, STRING | ||
TYPE must be one of the following tokens: [DATE, TIME, DATETIME, TIMESTAMP]. | ||
STRING must be one of the following tokens: ["USA", "JIS", "ISO", "EUR", "INTERNAL"] (" can be replaced by '). |
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.
only "USA" support for now, right?
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.
Ah yes. I will adjust the documentation for now and update it once the other formats are added.
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.
Fixed here
Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com>
d4aacb4
to
f97eea4
Compare
I had to rebase while addressing PR comments. There appears to be a failing test which exists on the |
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.
May I ask where this comes from? Is it part of deprecate legacy engine or other issue? Because I didn't find it in our codebase.
The |
It is one of MySQL functions which we're going to support. |
@GabeFernandez310 Shall we merge IT fix from |
Signed-off-by: GabeFernandez310 Gabriel.Fernandez@improving.com
Description
Adds the
get_format
function to the OpenSearch SQL Plugin. It's implementation is aligned with the MySQL Documentation.Note: This currently only supports a
USA
format forDATE
,TIME
,TIMESTAMP
andDATETIME
. Support and testing for other formats will be completed in follow-up workExamples:
Issues Resolved
#722
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.