Skip to content
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 Week_Of_Year Function To OpenSearch #175

Merged

Conversation

GabeFernandez310
Copy link

Description

Adds the week_of_year function to the SQL plugin. It behaves like the week function which already exists in the new engine, and both are aligned with MySQL

Issues Resolved

opensearch-project#722

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #175 (c49c112) into integ-add-week_of_year-function (d4d289c) will decrease coverage by 2.52%.
The diff coverage is 100.00%.

@@                          Coverage Diff                          @@
##             integ-add-week_of_year-function     #175      +/-   ##
=====================================================================
- Coverage                              98.28%   95.76%   -2.53%     
- Complexity                              3454     3455       +1     
=====================================================================
  Files                                    345      355      +10     
  Lines                                   8588     9249     +661     
  Branches                                 547      666     +119     
=====================================================================
+ Hits                                    8441     8857     +416     
- Misses                                   142      334     +192     
- Partials                                   5       58      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 98.28% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/main/java/org/opensearch/sql/expression/DSL.java 100.00% <100.00%> (ø)
...arch/sql/expression/datetime/DateTimeFunction.java 100.00% <100.00%> (ø)
...h/sql/expression/function/BuiltinFunctionName.java 100.00% <100.00%> (ø)
...h/public/components/QueryLanguageSwitch/Switch.tsx 85.71% <0.00%> (ø)
workbench/public/utils/PanelWrapper.tsx 100.00% <0.00%> (ø)
workbench/public/components/SQLPage/SQLPage.tsx 100.00% <0.00%> (ø)
workbench/public/components/Header/Header.tsx 100.00% <0.00%> (ø)
...ch/public/components/QueryResults/QueryResults.tsx 61.60% <0.00%> (ø)
workbench/public/application.tsx 0.00% <0.00%> (ø)
workbench/public/components/Main/main.tsx 53.00% <0.00%> (ø)
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@GabeFernandez310 GabeFernandez310 marked this pull request as ready for review November 23, 2022 15:41
@GabeFernandez310 GabeFernandez310 requested a review from a team November 23, 2022 16:21
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Copy link

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add function to PPL as well.

Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
@GabeFernandez310
Copy link
Author

Add function to PPL as well.

I believe this is out of scope. The ticket describes adding it to the SQL parser, but I can make a new ticket to add it to PPL as well if that is what we want

Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
@GabeFernandez310 GabeFernandez310 requested a review from a team November 29, 2022 17:20
@GabeFernandez310 GabeFernandez310 merged commit 2b73ac5 into integ-add-week_of_year-function Nov 30, 2022
@GabeFernandez310 GabeFernandez310 deleted the dev-add-week_of_year-function branch December 1, 2022 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants