forked from opensearch-project/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
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 WEEKDAY
Function to SQL Plugin
#234
Merged
GabeFernandez310
merged 12 commits into
integ-add-weekday-function
from
dev-add-weekday-function
Mar 9, 2023
Merged
Add WEEKDAY
Function to SQL Plugin
#234
GabeFernandez310
merged 12 commits into
integ-add-weekday-function
from
dev-add-weekday-function
Mar 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
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## integ-add-weekday-function #234 +/- ##
=============================================================
Coverage 98.38% 98.38%
- Complexity 3693 3697 +4
=============================================================
Files 343 343
Lines 9107 9119 +12
Branches 585 585
=============================================================
+ Hits 8960 8972 +12
Misses 142 142
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
core/src/test/java/org/opensearch/sql/expression/datetime/DateTimeFunctionTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: GabeFernandez310 <[email protected]>
Yury-Fridlyand
approved these changes
Feb 28, 2023
core/src/test/java/org/opensearch/sql/expression/datetime/WeekdayTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/opensearch/sql/expression/datetime/WeekdayTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: GabeFernandez310 <[email protected]>
Signed-off-by: GabeFernandez310 <[email protected]>
GumpacG
approved these changes
Mar 2, 2023
matthewryanwells
approved these changes
Mar 6, 2023
Signed-off-by: GabeFernandez310 <[email protected]>
acarbonetto
approved these changes
Mar 8, 2023
core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFunction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: GabeFernandez310 <[email protected]>
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.
Description
Adds the
weekday
function to the SQL plugin. The function accepts aDATE
/TIME
/DATETIME
/TIMESTAMP
/STRING
and returns an index 0-6 (Monday-Sunday) for the corresponding weekday the date lands on. If aTIME
is used the function uses the current day. This is based on MySQL docs.Examples:
SELECT weekday('2020-08-27')
->3
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.