-
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 WEEKDAY
Function to SQL Plugin
#1418
Add WEEKDAY
Function to SQL Plugin
#1418
Conversation
* Added Tests Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Added Implementation Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Added Documentation Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Fixed IT Test Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Adjusted IT test Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Fixed Implementation for Time And Unit Tests Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Addressed PR Comments Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Cleaned WeekdayTest File Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Fixed Docs Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Fixed Doctest Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> * Removed Unneeded Function Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> --------- 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 #1418 +/- ##
=========================================
Coverage 98.38% 98.39%
- Complexity 3698 3702 +4
=========================================
Files 343 343
Lines 9121 9133 +12
Branches 586 586
=========================================
+ Hits 8974 8986 +12
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. |
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.
LGTM
* Added Tests * Added Implementation * Added Documentation * Fixed IT Test * Adjusted IT test * Fixed Implementation for Time And Unit Tests * Addressed PR Comments * Cleaned WeekdayTest File * Fixed Docs * Fixed Doctest * Removed Unneeded Function --------- Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> (cherry picked from commit 4f9f5ca)
* Added Tests * Added Implementation * Added Documentation * Fixed IT Test * Adjusted IT test * Fixed Implementation for Time And Unit Tests * Addressed PR Comments * Cleaned WeekdayTest File * Fixed Docs * Fixed Doctest * Removed Unneeded Function --------- Signed-off-by: GabeFernandez310 <Gabriel.Fernandez@improving.com> (cherry picked from commit 4f9f5ca) Co-authored-by: GabeFernandez310 <Gabriel.Fernandez@improving.com>
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.