-
Notifications
You must be signed in to change notification settings - Fork 141
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
Update TIMESTAMP
function implementation and signatures.
#1254
Update TIMESTAMP
function implementation and signatures.
#1254
Conversation
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1254 +/- ##
============================================
- Coverage 98.35% 98.35% -0.01%
- Complexity 3617 3618 +1
============================================
Files 343 343
Lines 8927 8923 -4
Branches 569 569
============================================
- Hits 8780 8776 -4
Misses 142 142
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
core/src/main/java/org/opensearch/sql/expression/datetime/DateTimeFunction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
…ime types cast (PR opensearch-project#1196). Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
@@ -419,7 +419,12 @@ public static FunctionExpression time_to_sec(Expression... expressions) { | |||
} | |||
|
|||
public static FunctionExpression timestamp(Expression... expressions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why leave this function signature? There are only about 10 tests to update to remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All functions from this file are used in tests only.
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
2e04408
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
* Update `TIMESTAMP` function implementation and signatures. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Simplify `TIMESTAMP` function implementation by using automatic datetime types cast (PR #1196). Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Checkstyle fix. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> --------- Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> (cherry picked from commit ecb9dec)
…1340) * Update `TIMESTAMP` function implementation and signatures. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Simplify `TIMESTAMP` function implementation by using automatic datetime types cast (PR #1196). Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Checkstyle fix. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> --------- Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> (cherry picked from commit ecb9dec) Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand yury.fridlyand@improving.com
Description
I referred to MySQL docs and tried to reproduce MySQL v.8.0.30 behavior as a reference.
See team review and discussion in Bit-Quill#139
Updated function:
TIMESTAMP
Signatures
Notes:
Unlike MySQL,
TIMESTAMP
function returns aTIMESTAMP
object (Instant
), not aDATETIME
.Test queries:
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.