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

#1020: earliest/latest not supported with where command #1021

Merged
merged 7 commits into from
Jan 27, 2025

Conversation

currantw
Copy link
Contributor

Description

Add support for using earliest and latest relative time functions with the where command.

Related Issues

Resolved #1020.

Check List

  • Updated documentation (docs/ppl-lang/README.md)
  • Implemented unit tests
  • Implemented tests for combination with other commands
  • New added source code should include a copyright header
  • 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: currantw <[email protected]>
Comment on lines +856 to +857
| EARLIEST
| LATEST
Copy link
Contributor Author

@currantw currantw Jan 24, 2025

Choose a reason for hiding this comment

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

This is the only functional (non-test) change in this PR. Remainder of the changes are related to adding relative date time tests using where to integration and doc tests.

Signed-off-by: currantw <[email protected]>
Signed-off-by: currantw <[email protected]>
Signed-off-by: currantw <[email protected]>
Signed-off-by: currantw <[email protected]>
| description | relative_string |
+--------------+-----------------+
| Now | NOW |
| Tomorrow | +D@D |
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this +D@D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+D will given a timestamp corresponding to the current time tomorrow, while +D@D will give a timestamp corresponding to the start of tomorrow (i.e. 00:00 AM).

@YANG-DB YANG-DB merged commit 3832906 into opensearch-project:main Jan 27, 2025
4 checks passed
@YANG-DB
Copy link
Member

YANG-DB commented Jan 27, 2025

Thanks @currantw

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.

[BUG] earliest/latest not supported with where command
4 participants