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

Added new datetime functions and aliases to PPL [Part 2] #1852

Merged

Conversation

matthewryanwells
Copy link
Contributor

Description

This PR adds multiple datetime functions that are in SQL to PPL.

The following functions are added:

  • get_format
  • last_day
  • sec_to_time
  • yearweek
  • weekday
  • to_seconds
  • str_to_date
  • timestampadd
  • timestampdiff
  • extract

Issues Resolved

No related issue

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.

* Added new datetime functions, documentation, and tests

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #1852 (a07adc8) into main (f5031a7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #1852   +/-   ##
=========================================
  Coverage     97.39%   97.39%           
- Complexity     4600     4606    +6     
=========================================
  Files           401      401           
  Lines         11381    11403   +22     
  Branches        843      843           
=========================================
+ Hits          11084    11106   +22     
  Misses          290      290           
  Partials          7        7           
Flag Coverage Δ
sql-engine 97.39% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...pensearch/sql/ppl/parser/AstExpressionBuilder.java 100.00% <100.00%> (ø)

@MaxKsyunz MaxKsyunz merged commit 8c8e08c into opensearch-project:main Jul 14, 2023
16 checks passed
@MaxKsyunz MaxKsyunz deleted the integ-ppl-function-support-part2 branch July 14, 2023 17:05
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 14, 2023
* Added new datetime functions, documentation, and tests

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
(cherry picked from commit 8c8e08c)
matthewryanwells added a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 14, 2023
…search-project#1852)

* Added new datetime functions, documentation, and tests

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 20, 2023
…search-project#1852)

* Added new datetime functions, documentation, and tests

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Signed-off-by: Mitchell Gale <Mitchell.Gale@improving.com>
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 20, 2023
…search-project#1852)

* Added new datetime functions, documentation, and tests

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Signed-off-by: Mitchell Gale <Mitchell.Gale@improving.com>
Yury-Fridlyand pushed a commit that referenced this pull request Jul 27, 2023
* Added new datetime functions, documentation, and tests

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
(cherry picked from commit 8c8e08c)
MitchellGale pushed a commit to Bit-Quill/opensearch-project-sql that referenced this pull request Jul 28, 2023
…search-project#1852)

* Added new datetime functions, documentation, and tests

Signed-off-by: Matthew Wells <matthew.wells@improving.com>
Signed-off-by: Mitchell Gale <Mitchell.Gale@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants