-
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 functions ADDTIME
and SUBTIME
. (#132)
#1194
Merged
Yury-Fridlyand
merged 4 commits into
opensearch-project:main
from
Bit-Quill:integ-datetime-addsubtime-functions
Jan 9, 2023
Merged
Add functions ADDTIME
and SUBTIME
. (#132)
#1194
Yury-Fridlyand
merged 4 commits into
opensearch-project:main
from
Bit-Quill:integ-datetime-addsubtime-functions
Jan 9, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add functions `ADDTIME` and `SUBTIME`. Signed-off-by: Yury-Fridlyand <[email protected]> Signed-off-by: Yury-Fridlyand <[email protected]>
87 tasks
Codecov Report
@@ Coverage Diff @@
## main #1194 +/- ##
============================================
- Coverage 98.34% 95.90% -2.44%
- Complexity 3584 3593 +9
============================================
Files 344 354 +10
Lines 8858 9566 +708
Branches 559 680 +121
============================================
+ Hits 8711 9174 +463
- Misses 142 334 +192
- Partials 5 58 +53
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. |
6 tasks
penghuo
previously approved these changes
Jan 6, 2023
dai-chen
previously approved these changes
Jan 6, 2023
@Yury-Fridlyand There seems some conflicts blocking the merge. |
Signed-off-by: Yury-Fridlyand <[email protected]>
…ubtime-functions Signed-off-by: Yury-Fridlyand <[email protected]>
Fixed, please re-approve. |
dai-chen
approved these changes
Jan 9, 2023
penghuo
approved these changes
Jan 9, 2023
YANG-DB
pushed a commit
that referenced
this pull request
Jan 9, 2023
penghuo
added a commit
that referenced
this pull request
Jan 10, 2023
* Add BWC tests for running against distribution bundle. (#1209) Signed-off-by: Zelin Hao <[email protected]> * Add Alternate Syntax For Match_Query And Other Functions (#1166) Added Tests And Implementation For Match_Query, Match_Phrase, and Multi_Match Functions Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> * Merge pull request #1241 from Bit-Quill/Failing-CI-Hot-Fix Hot Fix For CI Build (cherry picked from commit aae57a0) Signed-off-by: GabeFernandez310 <[email protected]> * Fixed error with single timestamp query (#1244) (#1246) Signed-off-by: vamsi-amazon <[email protected]> Signed-off-by: vamsi-amazon <[email protected]> (cherry picked from commit ee949cc) Co-authored-by: vamsi-amazon <[email protected]> * Add Second_Of_Minute Function As An Alias Of The Second Function (#1231) (#1237) Added Testing And Implementation For Second_Of_Minute Function Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> (cherry picked from commit dce7d0e) Co-authored-by: GabeFernandez310 <[email protected]> * Add functions `ADDTIME` and `SUBTIME`. (#132) (#1194) (#1252) * Add functions `ADDTIME` and `SUBTIME`. (#132) Signed-off-by: Yury-Fridlyand <[email protected]> (cherry picked from commit 7630f87) Co-authored-by: Yury-Fridlyand <[email protected]> * Add Day_Of_Week Function As An Alias Of DayOfWeek (#190) (#1228) (#1239) Added Implementation And Testing For Day_Of_Week Function Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> (cherry picked from commit bac9c37) Co-authored-by: GabeFernandez310 <[email protected]> * [Backport 2.x] Add Minute_Of_Hour Function As An Alias Of Minute Function (#1253) * Add Minute_Of_Hour Function As An Alias Of Minute Function (#196) (#1230) Added Testing And Implementation For Minute_Of_Hour Function Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> (cherry picked from commit 61e2374) * Added Missing Imports Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> * Add support for long value return for CEIL, CEILING and FLOOR math functions (#1205) (#1255) * Added long fix for CEIL, CEILING and FLOOR functions using LONG instead of INT for RETURN. Signed-off-by: MitchellGale-BitQuill <[email protected]> Signed-off-by: Yury-Fridlyand <[email protected]> Co-authored-by: Yury-Fridlyand <[email protected]> * Support JOIN query on object field with unexpanded name (#1229) (#1250) * Resolve sub object field in search hit source Signed-off-by: Chen Dai <[email protected]> * Rename to unexpanded object Signed-off-by: Chen Dai <[email protected]> * Update IT with where condition Signed-off-by: Chen Dai <[email protected]> * Fix test index mapping Signed-off-by: Chen Dai <[email protected]> Signed-off-by: Chen Dai <[email protected]> (cherry picked from commit 151f4cc) Co-authored-by: Chen Dai <[email protected]> * Remove unnecessary scripts after repo split (#1256) Signed-off-by: Joshua Li <[email protected]> * Add Support For `TIME` Type in "*_OF_YEAR" Functions (#199) (#1223) (#1258) Added Support And Tests For Time Type in day_of_year, week_of_year, month_of_year Functions Signed-off-by: GabeFernandez310 <[email protected]> (cherry picked from commit 6e72f18) Co-authored-by: GabeFernandez310 <[email protected]> Signed-off-by: Zelin Hao <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: GabeFernandez310 <[email protected]> Signed-off-by: MitchellGale-BitQuill <[email protected]> Signed-off-by: Yury-Fridlyand <[email protected]> Signed-off-by: Joshua Li <[email protected]> Co-authored-by: Zelin Hao <[email protected]> Co-authored-by: GabeFernandez310 <[email protected]> Co-authored-by: YANGDB <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: vamsi-amazon <[email protected]> Co-authored-by: Yury-Fridlyand <[email protected]> Co-authored-by: GabeFernandez310 <[email protected]> Co-authored-by: Chen Dai <[email protected]> Co-authored-by: Joshua Li <[email protected]>
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Yury-Fridlyand [email protected]
Description
I referred to MySQL docs and tried to reproduce MySQL v.8.0.30 behavior as a reference.
Please, see team review and discussion on Bit-Quill#132.
New functions:
ADDTIME
/SUBTIME
.Changes
Signature
Future changes (TODOs):
TIME
? #852Test queries:
Test data
I found that first 6 rows from
date0
,time0
,time1
,datetime0
are good for testing - these columns have different data types in MySQL. In OpenSearch SQL all[date][time]
columns havetimestamp
type, so I useCAST
for clear testing.data
Fixes
https://forum.opensearch.org/t/subdate-date-sub-query-method-not-supported/9252
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.