Add GET_FORMAT Function To OpenSearch SQL Plugin#1299
Add GET_FORMAT Function To OpenSearch SQL Plugin#1299MaxKsyunz merged 3 commits intoopensearch-project:mainfrom
GET_FORMAT Function To OpenSearch SQL Plugin#1299Conversation
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.
Does https://guava.dev/releases/19.0/api/docs/com/google/common/collect/Table.html solve the problem without concat the string value?
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.
only "USA" support for now, right?
There was a problem hiding this comment.
Ah yes. I will adjust the documentation for now and update it once the other formats are added.
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 |
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_formatfunction to the OpenSearch SQL Plugin. It's implementation is aligned with the MySQL Documentation.Note: This currently only supports a
USAformat forDATE,TIME,TIMESTAMPandDATETIME. 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.