[Backport 2.19-dev] Support time modifiers in search command (#4224) #4473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Backport #4224 to 2.19-dev
Commit Messages
Unit test search with absolute time range
Rephrase timeRange and timeModifier
Switch to earliest and latest udf
Add a convert util
Verify time correctness during coversion
Fix quarter parsing bugs
Fix week snap parsing
Remove old implementation that translates time modifier to time filter
Fix anomalyzed test & add a todo for an ignored test
Support now() in time range
Fix time modifier explain ITs
Support unixtimestamp (second) as a time modifier value
Update docs for search command with time modifiers
Test accessing fields with name earliest and latest in search command
Update doctest in condition.rst due to the update in the implementation of earliest and latest conditions
Update PPLQueryDataAnonymizerTest.java
Update explain ITs to use yaml plan files
Update a link to OpenSearch exists
Support using timesnaps without quotes
Add a unit test for direct format
Add support to ISO 8601 date format to time modifier, as it is now widely supported in PPL
Update syntax by reusing SPANLENGTH definition
Update explain IT for search with time modifier
Add integration tests for time modifiers
Parse timestamp string with multiple parsers in a loop
Remove opensearch test dependency from core module
Fix unit tests
Minor updates to explain limitations in search doc
(cherry picked from commit e468513)
Related Issues
#4135
Check List
--signoff
or-s
.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.