-
Notifications
You must be signed in to change notification settings - Fork 138
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 Timestampdiff
Function To OpenSearch SQL
#1467
Add Timestampdiff
Function To OpenSearch SQL
#1467
Conversation
Added Tests And Implementation For Timestampdiff --------- Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com>
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 #1467 +/- ##
============================================
+ Coverage 98.44% 98.46% +0.02%
- Complexity 3806 3865 +59
============================================
Files 343 345 +2
Lines 9449 9597 +148
Branches 601 615 +14
============================================
+ Hits 9302 9450 +148
Misses 142 142
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 23 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFunction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com>
* Add `Timestampdiff` Function To OpenSearch SQL Added Tests And Implementation For Timestampdiff --------- Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Removed Import Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> --------- Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> (cherry picked from commit 31148da)
* Add `Timestampdiff` Function To OpenSearch SQL Added Tests And Implementation For Timestampdiff --------- Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Removed Import Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> --------- Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> (cherry picked from commit 31148da) Co-authored-by: GabeFernandez310 <Gabriel.Fernandez@improving.com>
Description
Add the
timestampdiff
function to the SQL plugin. The function takes an argument for the unit of time used to measure the difference between the second argument (start time) and third argument (end time). The units allowed for the first argument are the same as those allowed for thetimestampadd
function and are also aligned with MySQL.Example:
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.