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

Implementation of UTC_DATE, UTC_TIME, UTC_TIMESTAMP #1031

Conversation

MitchellGale
Copy link
Contributor

Description

UTC_DATE, UTC_TIME, UTC_TIMESTAMP are all implemented according to MySQL standard.

Issues Resolved

Support date and time functions for new engine · Issue #709 · opendistro-for-elasticsearch/sql

Date time query improvement · Issue #46 · opensearch-project/sql

opensearchsql> select utc_date();                                                                                                                                                  
fetched rows / total rows = 1/1
+--------------+
| utc_date()   |
|--------------|
| 2022-10-03   |
+--------------+
opensearchsql> select utc_time();                                                                                                                                                  
fetched rows / total rows = 1/1
+--------------+
| utc_time()   |
|--------------|
| 17:54:27     |
+--------------+
opensearchsql> select utc_timestamp();                                                                                                                                             
fetched rows / total rows = 1/1
+---------------------+
| utc_timestamp()     |
|---------------------|
| 2022-10-03 17:54:28 |
+---------------------+

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.

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.

1 participant