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 Day_Of_Year Function To OpenSearch #1128

Merged

Conversation

GabeFernandez310
Copy link
Contributor

@GabeFernandez310 GabeFernandez310 commented Dec 1, 2022

Description

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

*Note: This function does not currently support the TIME type because adding support for this is currently blocked by PR 1047. This will be accomplished in future work.

Issues Resolved

#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.

@GabeFernandez310 GabeFernandez310 requested a review from a team as a code owner December 1, 2022 05:06
Yury-Fridlyand
Yury-Fridlyand previously approved these changes Dec 1, 2022
dai-chen
dai-chen previously approved these changes Dec 5, 2022
Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

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

Thanks for the changes!

Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
@GabeFernandez310 GabeFernandez310 force-pushed the integ-add-day_of_year-function branch from a76edcf to 38e3408 Compare December 5, 2022 20:33
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2022

Codecov Report

Merging #1128 (38e3408) into 2.x (43ceda1) will decrease coverage by 2.50%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                2.x    #1128      +/-   ##
============================================
- Coverage     98.30%   95.79%   -2.51%     
- Complexity     3470     3471       +1     
============================================
  Files           348      358      +10     
  Lines          8659     9320     +661     
  Branches        549      668     +119     
============================================
+ Hits           8512     8928     +416     
- Misses          142      334     +192     
- Partials          5       58      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 98.30% <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%> (ø)
...ublic/components/QueryResults/QueryResultsBody.tsx 68.32% <0.00%> (ø)
workbench/public/components/PPLPage/PPLPage.tsx 56.52% <0.00%> (ø)
workbench/public/components/app.tsx 0.00% <0.00%> (ø)
workbench/public/components/Main/main.tsx 53.00% <0.00%> (ø)
...ch/public/components/QueryResults/QueryResults.tsx 61.60% <0.00%> (ø)
workbench/public/utils/PanelWrapper.tsx 100.00% <0.00%> (ø)
workbench/public/application.tsx 0.00% <0.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@GabeFernandez310 GabeFernandez310 requested review from dai-chen and removed request for penghuo December 5, 2022 21:05
@penghuo penghuo merged commit b304ddc into opensearch-project:2.x Dec 6, 2022
@dai-chen dai-chen added the enhancement New feature or request label Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants