-
Notifications
You must be signed in to change notification settings - Fork 145
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
Fix type cast to datetime #1328
Conversation
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.com>
Signed-off-by: Chen Dai <daichen@amazon.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 #1328 +/- ##
=========================================
Coverage 98.36% 98.36%
Complexity 3636 3636
=========================================
Files 343 343
Lines 8990 8990
Branches 585 585
=========================================
Hits 8843 8843
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. |
@@ -314,6 +314,7 @@ public void castIntFieldToDoubleWithAliasJdbcFormatGroupByTest() { | |||
rows("35.0")); | |||
} | |||
|
|||
@Ignore("V2 engine doesn't support datetime with TZ") |
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.
You can add new tests instead of disabled. For example:
SELECT
CAST(date0 AS date),
CAST(time0 AS datetime),
CAST(time1 AS time),
CAST(datetime0 AS timestamp),
FROM calcs;
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.
Oddly, an integration test failed built against java 11 but not 17.
2023-02-08T00:55:09.8325128Z org.opensearch.sql.ppl.PrometheusDataSourceCommandsIT > testSourceMetricCommandWithTimestamp FAILED
2023-02-08T00:55:09.8325926Z org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:44401], URI [/_plugins/_ppl], status line [HTTP/1.1 400 Bad Request]
2023-02-08T00:55:09.8326316Z {
2023-02-08T00:55:09.8326507Z "error": {
2023-02-08T00:55:09.8326729Z "reason": "Invalid Query",
2023-02-08T00:55:09.8327490Z "details": "timestamp:5-02-08 02:55:09 in unsupported format, please use yyyy-MM-dd HH:mm:ss[.SSSSSSSSS]",
2023-02-08T00:55:09.8327855Z "type": "SemanticCheckException"
2023-02-08T00:55:09.8328094Z },
2023-02-08T00:55:09.8328272Z "status": 400
2023-02-08T00:55:09.8328470Z }
This test fails on some locales/timezones. You can track it in #1275. |
Thanks for the info! Let me check and fix. |
Closing due to #853 (comment) |
Description
TODO
Issues Resolved
#853
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.