Add UTC_DATE, UTC_TIME, UTC_TIMESTAMP#187
Add UTC_DATE, UTC_TIME, UTC_TIMESTAMP#187MitchellGale merged 6 commits intoInteg-UTC_DATE_TIME_TIMESTAMP_LIKENOWfrom
Conversation
Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Codecov Report
@@ Coverage Diff @@
## Integ-UTC_DATE_TIME_TIMESTAMP_LIKENOW #187 +/- ##
============================================================================
- Coverage 98.31% 62.76% -35.55%
============================================================================
Files 348 10 -338
Lines 8707 658 -8049
Branches 555 119 -436
============================================================================
- Hits 8560 413 -8147
- Misses 142 192 +50
- Partials 5 53 +48
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Yury-Fridlyand
left a comment
There was a problem hiding this comment.
Please, update ppl/src/test/java/org/opensearch/sql/ppl/antlr/NowLikeFunctionParserTest.java and sql/src/test/java/org/opensearch/sql/sql/parser/AstNowLikeFunctionTest.java too
core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFunction.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFunction.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/sql/DateTimeFunctionIT.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/sql/DateTimeFunctionIT.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/sql/DateTimeFunctionIT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
MaxKsyunz
left a comment
There was a problem hiding this comment.
A couple minor style comments but everything else LGTM.
| private DefaultFunctionResolver utc_time() { | ||
| return define(BuiltinFunctionName.UTC_TIME.getName(), | ||
| implWithProperties(functionProperties | ||
| -> DateTimeFunction.exprUtcTime(functionProperties), TIME)); |
There was a problem hiding this comment.
| -> DateTimeFunction.exprUtcTime(functionProperties), TIME)); | |
| ->exprUtcTime(functionProperties), TIME)); |
Doesn't this comment apply here as well?
| private DefaultFunctionResolver utc_timestamp() { | ||
| return define(BuiltinFunctionName.UTC_TIMESTAMP.getName(), | ||
| implWithProperties(functionProperties | ||
| -> DateTimeFunction.exprUtcTimeStamp(functionProperties), DATETIME)); |
There was a problem hiding this comment.
| -> DateTimeFunction.exprUtcTimeStamp(functionProperties), DATETIME)); | |
| ->exprUtcTimeStamp(functionProperties), DATETIME)); |
Doesn't this comment apply here as well?
Signed-off-by: MitchellGale-BitQuill <mitchellg@bitquilltech.com>
Description
Adds functionality for
UTC_TIME,UTC_DATEandUTC_TIMESTAMPfunctions.UTC_TIME - Returns current UTC time in
HH:mm:sstime format.UTC_DATE - Returns current UTC date in
uuuu-MM-dddate format.UTC_TIMESTAMP - Returns current UTC Date/time in
uuuu-MM-dd HH:mm:ssdate format.Example use cases:
Issues Resolved
opensearch-project#722
Check List
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.