Skip to content
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

Merged
merged 10 commits into from
Dec 19, 2024

Conversation

bpintea
Copy link
Contributor

@bpintea bpintea commented Dec 12, 2024

This just removes fixing a formatter to a timezone (UTC), allowing DATE_PARSE to correctly read timezones.

Fixes #117680.

@bpintea bpintea added >bug auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL v9.0.0 v8.17.1 v8.18.0 v8.16.3 labels Dec 12, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Dec 12, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @bpintea, I've created a changelog YAML for you.

Copy link
Contributor

@luigidellaquila luigidellaquila left a 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")
Copy link
Contributor

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);
Copy link
Contributor

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)

@bpintea bpintea added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Dec 19, 2024
Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticsearchmachine elasticsearchmachine merged commit 4007ff3 into elastic:main Dec 19, 2024
16 checks passed
@bpintea bpintea deleted the fix/date_parse_tz branch December 19, 2024 16:59
bpintea added a commit to bpintea/elasticsearch that referenced this pull request Dec 19, 2024
This just removes fixing a formatter to a timezone (UTC), allowing
`DATE_PARSE` to correctly read timezones.

Fixes elastic#117680.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.17
8.x
8.16

bpintea added a commit to bpintea/elasticsearch that referenced this pull request Dec 19, 2024
This just removes fixing a formatter to a timezone (UTC), allowing
`DATE_PARSE` to correctly read timezones.

Fixes elastic#117680.
bpintea added a commit to bpintea/elasticsearch that referenced this pull request Dec 19, 2024
This just removes fixing a formatter to a timezone (UTC), allowing
`DATE_PARSE` to correctly read timezones.

Fixes elastic#117680.
elasticsearchmachine pushed a commit that referenced this pull request Dec 19, 2024
This just removes fixing a formatter to a timezone (UTC), allowing
`DATE_PARSE` to correctly read timezones.

Fixes #117680.
elasticsearchmachine pushed a commit that referenced this pull request Dec 19, 2024
This just removes fixing a formatter to a timezone (UTC), allowing
`DATE_PARSE` to correctly read timezones.

Fixes #117680.
elasticsearchmachine pushed a commit that referenced this pull request Dec 19, 2024
This just removes fixing a formatter to a timezone (UTC), allowing
`DATE_PARSE` to correctly read timezones.

Fixes #117680.
elasticsearchmachine pushed a commit that referenced this pull request Dec 23, 2024
Allow warning header for date specifiers that could change in JDK23.
Relevant for 8.x BWC tests.

Related: #118603

Fixes #119148 Fixes #119151 Fixes #119152 Fixes #119153 Fixes #119154
Fixes #119160 Fixes #119161 Fixes #119162 Fixes #119163 Fixes #119164
Fixes #119165 Fixes #119166 Fixes #119167
bpintea added a commit to bpintea/elasticsearch that referenced this pull request Dec 23, 2024
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
bpintea added a commit to bpintea/elasticsearch that referenced this pull request Dec 23, 2024
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
bpintea added a commit to bpintea/elasticsearch that referenced this pull request Dec 23, 2024
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
elasticsearchmachine pushed a commit that referenced this pull request Dec 23, 2024
Allow warning header for date specifiers that could change in JDK23.
Relevant for 8.x BWC tests.

Related: #118603

Fixes #119148 Fixes #119151 Fixes #119152 Fixes #119153 Fixes #119154
Fixes #119160 Fixes #119161 Fixes #119162 Fixes #119163 Fixes #119164
Fixes #119165 Fixes #119166 Fixes #119167
elasticsearchmachine pushed a commit that referenced this pull request Dec 23, 2024
Allow warning header for date specifiers that could change in JDK23.
Relevant for 8.x BWC tests.

Related: #118603

Fixes #119148 Fixes #119151 Fixes #119152 Fixes #119153 Fixes #119154
Fixes #119160 Fixes #119161 Fixes #119162 Fixes #119163 Fixes #119164
Fixes #119165 Fixes #119166 Fixes #119167
elasticsearchmachine pushed a commit that referenced this pull request Dec 23, 2024
Allow warning header for date specifiers that could change in JDK23.
Relevant for 8.x BWC tests.

Related: #118603

Fixes #119148 Fixes #119151 Fixes #119152 Fixes #119153 Fixes #119154
Fixes #119160 Fixes #119161 Fixes #119162 Fixes #119163 Fixes #119164
Fixes #119165 Fixes #119166 Fixes #119167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.16.3 v8.17.1 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ES|QL] date_parse seems to ignore timezone
4 participants