Skip to content

Commit 06cd95a

Browse files
committed
ES|QL: Address PR review comments
Remove skip version from tbucket.csv-spec Polish code in AnalyzerTests Closes #131068
1 parent 466e563 commit 06cd95a

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// TBUCKET-specific tests
22

3-
tbucketByTenSecondsDuration#[skip:-9.1.99,reason:new grouping function added in 9.2]
3+
tbucketByTenSecondsDuration
44
required_capability: tbucket
55

66
FROM sample_data
@@ -18,7 +18,7 @@ min:datetime | max:datetime | bucket:datetime
1818
2023-10-23T13:55:01.543Z | 2023-10-23T13:55:01.543Z | 2023-10-23T13:55:00.000Z
1919
;
2020

21-
tbucketByTenSecondsDurationAsString#[skip:-9.1.99,reason:new grouping function added in 9.2]
21+
tbucketByTenSecondsDurationAsString
2222
required_capability: implicit_casting_string_literal_to_temporal_amount
2323
required_capability: tbucket
2424

@@ -37,7 +37,7 @@ min:datetime | max:datetime | bucket:datetime
3737
2023-10-23T13:55:01.543Z | 2023-10-23T13:55:01.543Z | 2023-10-23T13:55:00.000Z
3838
;
3939

40-
tbucketByTenMinutesDuration#[skip:-9.1.99,reason:new grouping function added in 9.2]
40+
tbucketByTenMinutesDuration
4141
required_capability: tbucket
4242

4343
FROM sample_data
@@ -52,7 +52,7 @@ min:datetime | max:datetime | bucket:datetime
5252
2023-10-23T13:51:54.732Z | 2023-10-23T13:55:01.543Z | 2023-10-23T13:50:00.000Z
5353
;
5454

55-
tbucketByTenMinutesDurationAsString#[skip:-9.1.99,reason:new grouping function added in 9.2]
55+
tbucketByTenMinutesDurationAsString
5656
required_capability: implicit_casting_string_literal_to_temporal_amount
5757
required_capability: tbucket
5858

@@ -68,7 +68,7 @@ min:datetime | max:datetime | bucket:datetime
6868
2023-10-23T13:51:54.732Z | 2023-10-23T13:55:01.543Z | 2023-10-23T13:50:00.000Z
6969
;
7070

71-
docsTBucketByOneHourDuration#[skip:-9.1.99,reason:new grouping function added in 9.2]
71+
docsTBucketByOneHourDuration
7272
required_capability: tbucket
7373

7474
// tag::docsTBucketByOneHourDuration[]
@@ -85,7 +85,7 @@ min:datetime | max:datetime | bucket:datetime
8585
// end::docsTBucketByOneHourDuration-result[]
8686
;
8787

88-
docsTBucketByOneHourDurationAsString#[skip:-9.1.99,reason:new grouping function added in 9.2]
88+
docsTBucketByOneHourDurationAsString
8989
required_capability: implicit_casting_string_literal_to_temporal_amount
9090
required_capability: tbucket
9191

@@ -103,7 +103,7 @@ min:datetime | max:datetime | bucket:datetime
103103
// end::docsTBucketByOneHourDurationAsString-result[]
104104
;
105105

106-
tbucketByOneDayDuration#[skip:-9.1.99,reason:new grouping function added in 9.2]
106+
tbucketByOneDayDuration
107107
required_capability: tbucket
108108

109109
FROM sample_data
@@ -115,7 +115,7 @@ min:datetime | max:datetime | bucket:datetime
115115
2023-10-23T12:15:03.360Z | 2023-10-23T13:55:01.543Z | 2023-10-23T00:00:00.000Z
116116
;
117117

118-
tbucketByOneDayDurationAsString#[skip:-9.1.99,reason:new grouping function added in 9.2]
118+
tbucketByOneDayDurationAsString
119119
required_capability: implicit_casting_string_literal_to_temporal_amount
120120
required_capability: tbucket
121121

@@ -128,7 +128,7 @@ min:datetime | max:datetime | bucket:datetime
128128
2023-10-23T12:15:03.360Z | 2023-10-23T13:55:01.543Z | 2023-10-23T00:00:00.000Z
129129
;
130130

131-
tbucketByOneWeekDuration#[skip:-9.1.99,reason:new grouping function added in 9.2]
131+
tbucketByOneWeekDuration
132132
required_capability: tbucket
133133

134134
FROM sample_data
@@ -140,7 +140,7 @@ min:datetime | max:datetime | bucket:datetime
140140
2023-10-23T12:15:03.360Z | 2023-10-23T13:55:01.543Z | 2023-10-23T00:00:00.000Z
141141
;
142142

143-
tbucketByOneWeekDurationAsString#[skip:-9.1.99,reason:new grouping function added in 9.2]
143+
tbucketByOneWeekDurationAsString
144144
required_capability: implicit_casting_string_literal_to_temporal_amount
145145
required_capability: tbucket
146146

@@ -153,7 +153,7 @@ min:datetime | max:datetime | bucket:datetime
153153
2023-10-23T12:15:03.360Z | 2023-10-23T13:55:01.543Z | 2023-10-23T00:00:00.000Z
154154
;
155155

156-
tbucketByOneMonthDuration#[skip:-9.1.99,reason:new grouping function added in 9.2]
156+
tbucketByOneMonthDuration
157157
required_capability: tbucket
158158

159159
FROM sample_data
@@ -165,7 +165,7 @@ min:datetime | max:datetime | bucket:datetime
165165
2023-10-23T12:15:03.360Z | 2023-10-23T13:55:01.543Z | 2023-10-01T00:00:00.000Z
166166
;
167167

168-
tbucketByOneMonthDurationAsString#[skip:-9.1.99,reason:new grouping function added in 9.2]
168+
tbucketByOneMonthDurationAsString
169169
required_capability: implicit_casting_string_literal_to_temporal_amount
170170
required_capability: tbucket
171171

@@ -178,7 +178,7 @@ min:datetime | max:datetime | bucket:datetime
178178
2023-10-23T12:15:03.360Z | 2023-10-23T13:55:01.543Z | 2023-10-01T00:00:00.000Z
179179
;
180180

181-
tbucketByOneYearDuration#[skip:-9.1.99,reason:new grouping function added in 9.2]
181+
tbucketByOneYearDuration
182182
required_capability: tbucket
183183

184184
FROM sample_data
@@ -190,7 +190,7 @@ min:datetime | max:datetime | bucket:datetime
190190
2023-10-23T12:15:03.360Z | 2023-10-23T13:55:01.543Z | 2023-01-01T00:00:00.000Z
191191
;
192192

193-
tbucketByOneYearDurationAsString#[skip:-9.1.99,reason:new grouping function added in 9.2]
193+
tbucketByOneYearDurationAsString
194194
required_capability: implicit_casting_string_literal_to_temporal_amount
195195
required_capability: tbucket
196196

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4134,16 +4134,16 @@ public void testGroupingOverridesInInlinestats() {
41344134
}
41354135

41364136
public void testTBucketWithIntervalInStringInBothAggregationAndGrouping() {
4137-
var plan = analyze("""
4137+
LogicalPlan plan = analyze("""
41384138
FROM sample_data
41394139
| STATS min = MIN(@timestamp), max = MAX(@timestamp) BY bucket = TBUCKET("1 week")
41404140
| SORT min
41414141
""", "mapping-sample_data.json");
41424142

4143-
var limit = as(plan, Limit.class);
4144-
var orderBy = as(limit.child(), OrderBy.class);
4145-
var agg = as(orderBy.child(), Aggregate.class);
4146-
var aggregates = agg.aggregates();
4143+
Limit limit = as(plan, Limit.class);
4144+
OrderBy orderBy = as(limit.child(), OrderBy.class);
4145+
Aggregate agg = as(orderBy.child(), Aggregate.class);
4146+
List<? extends NamedExpression> aggregates = agg.aggregates();
41474147
assertThat(aggregates, hasSize(3));
41484148
Alias a = as(aggregates.get(0), Alias.class);
41494149
assertEquals("min", a.name());

0 commit comments

Comments
 (0)