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 Minute_Of_Day Function To SQL Plugin #1207

Merged

Conversation

GabeFernandez310
Copy link
Contributor

Signed-off-by: GabeFernandez310 [email protected]

Description

Adds the function minute_of_day to the OpenSearch SQL plugin

Example:

SELECT minute_of_day('12:23:34');
fetched rows / total rows = 1/1
+-----------------------------+
| minute_of_day('12:23:34')   |
|-----------------------------|
| 743                         |
+-----------------------------+
opensearchsql> SELECT minute_of_day(datetime('2022-12-22 12:23:34'));
fetched rows / total rows = 1/1
+--------------------------------------------------+
| minute_of_day(datetime('2022-12-22 12:23:34'))   |
|--------------------------------------------------|
| 743                                              |
+--------------------------------------------------+
opensearchsql>
opensearchsql> SELECT minute_of_day(DATE '2022-12-22');
fetched rows / total rows = 1/1
+------------------------------------+
| minute_of_day(DATE '2022-12-22')   |
|------------------------------------|
| 0                                  |
+------------------------------------+

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 22, 2022 16:33
@dai-chen dai-chen added enhancement New feature or request backport 2.x labels Dec 23, 2022
@dai-chen dai-chen merged commit 2c46797 into opensearch-project:main Jan 3, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 3, 2023
Signed-off-by: GabeFernandez310 <[email protected]>

Signed-off-by: GabeFernandez310 <[email protected]>
(cherry picked from commit 2c46797)
dai-chen pushed a commit that referenced this pull request Jan 3, 2023
Signed-off-by: GabeFernandez310 <[email protected]>

Signed-off-by: GabeFernandez310 <[email protected]>
(cherry picked from commit 2c46797)

Co-authored-by: GabeFernandez310 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants