-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
ESQL: allow DATE_PARSE to read the timezones #118603
ESQL: allow DATE_PARSE to read the timezones #118603
Conversation
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @bpintea, I've created a changelog YAML for you. |
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.
LGTM, thanks @bpintea
I left just a couple of comments about tests.
() -> new TestCaseSupplier.TestCase( | ||
List.of( | ||
new TestCaseSupplier.TypedData(new BytesRef("dd/MMM/yyyy:HH:mm:ss Z"), DataType.KEYWORD, "first"), | ||
new TestCaseSupplier.TypedData(new BytesRef("12/Jul/2022:10:24:10 +0900"), DataType.KEYWORD, "second") |
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.
nit: we could randomize this a bit (only on the hour of course, no need to complicate it too much)
@@ -494,6 +494,52 @@ b:datetime | |||
null | |||
; | |||
|
|||
evalDateParseWithTimezone | |||
required_capability: date_parse_tz | |||
row s = "12/Jul/2022:10:24:10 +0900" | eval d = date_parse("dd/MMM/yyyy:HH:mm:ss Z", s); |
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.
nit: it would be good to have at least one test that crosses midnight (we could complicate it more with months/years/leap day but IMHO it's overkill)
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.
LGTM
This just removes fixing a formatter to a timezone (UTC), allowing `DATE_PARSE` to correctly read timezones. Fixes elastic#117680.
This just removes fixing a formatter to a timezone (UTC), allowing `DATE_PARSE` to correctly read timezones. Fixes elastic#117680.
This just removes fixing a formatter to a timezone (UTC), allowing `DATE_PARSE` to correctly read timezones. Fixes elastic#117680.
Allow warning header for date specifiers that could change in JDK23. Relevant for 8.x BWC tests. Related: elastic#118603 Fixes elastic#119148 Fixes elastic#119151 Fixes elastic#119152 Fixes elastic#119153 Fixes elastic#119154 Fixes elastic#119160 Fixes elastic#119161 Fixes elastic#119162 Fixes elastic#119163 Fixes elastic#119164 Fixes elastic#119165 Fixes elastic#119166 Fixes elastic#119167
Allow warning header for date specifiers that could change in JDK23. Relevant for 8.x BWC tests. Related: elastic#118603 Fixes elastic#119148 Fixes elastic#119151 Fixes elastic#119152 Fixes elastic#119153 Fixes elastic#119154 Fixes elastic#119160 Fixes elastic#119161 Fixes elastic#119162 Fixes elastic#119163 Fixes elastic#119164 Fixes elastic#119165 Fixes elastic#119166 Fixes elastic#119167
Allow warning header for date specifiers that could change in JDK23. Relevant for 8.x BWC tests. Related: elastic#118603 Fixes elastic#119148 Fixes elastic#119151 Fixes elastic#119152 Fixes elastic#119153 Fixes elastic#119154 Fixes elastic#119160 Fixes elastic#119161 Fixes elastic#119162 Fixes elastic#119163 Fixes elastic#119164 Fixes elastic#119165 Fixes elastic#119166 Fixes elastic#119167
This just removes fixing a formatter to a timezone (UTC), allowing
DATE_PARSE
to correctly read timezones.Fixes #117680.