Skip to content

Commit 18ee6b0

Browse files
authored
Allow warning for some date specifiers (#119216)
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
1 parent 41ebfd5 commit 18ee6b0

File tree

1 file changed

+6
-0
lines changed
  • x-pack/plugin/esql/qa/testFixtures/src/main/resources

1 file changed

+6
-0
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/date.csv-spec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ null
497497
evalDateParseWithTimezone
498498
required_capability: date_parse_tz
499499
row s = "12/Jul/2022:10:24:10 +0900" | eval d = date_parse("dd/MMM/yyyy:HH:mm:ss Z", s);
500+
warningRegex:Date format \[dd/MMM/yyyy:HH:mm:ss Z\] contains textual field specifiers that could change in JDK 23.*
500501

501502
s:keyword | d:datetime
502503
12/Jul/2022:10:24:10 +0900 | 2022-07-12T01:24:10.000Z
@@ -505,6 +506,7 @@ s:keyword | d:datetime
505506
evalDateParseWithTimezoneCrossingDayBoundary
506507
required_capability: date_parse_tz
507508
row s = "12/Jul/2022:08:24:10 +0900" | eval d = date_parse("dd/MMM/yyyy:HH:mm:ss Z", s);
509+
warningRegex:Date format \[dd/MMM/yyyy:HH:mm:ss Z\] contains textual field specifiers that could change in JDK 23.*
508510

509511
s:keyword | d:datetime
510512
12/Jul/2022:08:24:10 +0900 | 2022-07-11T23:24:10.000Z
@@ -517,6 +519,8 @@ row s1 = "12/Jul/2022:10:24:10 +0900", s2 = "2022/12/07 09:24:10 +0800"
517519
| eval eq = d1 == d2
518520
| keep d1, eq
519521
;
522+
warningRegex:Date format \[dd/MMM/yyyy:HH:mm:ss Z\] contains textual field specifiers that could change in JDK 23.*
523+
warningRegex:Date format \[yyyy/dd/MM HH:mm:ss Z\] contains textual field specifiers that could change in JDK 23.*
520524

521525
d1:datetime | eq:boolean
522526
2022-07-12T01:24:10.000Z | true
@@ -529,6 +533,7 @@ row s = "2022/12/07 09:24:10", format="yyyy/dd/MM HH:mm:ss"
529533
| eval with_tz = date_parse(concat(format, " Z"), concat(s, " +0900"))
530534
| keep s, no_tz, with_tz
531535
;
536+
warningRegex:Date format \[yyyy/dd/MM HH:mm:ss Z\] contains textual field specifiers that could change in JDK 23.*
532537

533538
s:keyword | no_tz:datetime | with_tz:datetime
534539
2022/12/07 09:24:10 | 2022-07-12T09:24:10.000Z | 2022-07-12T00:24:10.000Z
@@ -543,6 +548,7 @@ row s = "2022/12/07 09:24:10", format="yyyy/dd/MM HH:mm:ss"
543548
| eval with_tz4 = date_parse(concat(format, " O"), concat(s, " GMT+9"))
544549
| keep s, with_tz*
545550
;
551+
warningRegex:Date format \[yyyy/dd/MM HH:mm:ss .\] contains textual field specifiers that could change in JDK 23.*
546552

547553
s:keyword | with_tz1:datetime | with_tz2:datetime | with_tz3:datetime | with_tz4:datetime
548554
2022/12/07 09:24:10 | 2022-07-12T00:24:10.000Z | 2022-07-12T00:24:10.000Z | 2022-07-12T00:24:10.000Z | 2022-07-12T00:24:10.000Z

0 commit comments

Comments
 (0)