Skip to content

Commit fa42e76

Browse files
committed
Replace capability with a single, incrementing one
1 parent f7752a0 commit fa42e76

File tree

7 files changed

+23
-43
lines changed

7 files changed

+23
-43
lines changed

x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/MultiClusterSpecIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,10 @@ protected boolean supportsTook() throws IOException {
428428
@Override
429429
protected boolean supportsExponentialHistograms() {
430430
try {
431-
return RestEsqlTestCase.hasCapabilities(client(), List.of(EsqlCapabilities.Cap.EXPONENTIAL_HISTOGRAM.capabilityName()))
431+
return RestEsqlTestCase.hasCapabilities(client(), List.of(EsqlCapabilities.Cap.EXPONENTIAL_HISTOGRAM_PRE_TECH_PREVIEW_V1.capabilityName()))
432432
&& RestEsqlTestCase.hasCapabilities(
433433
remoteClusterClient(),
434-
List.of(EsqlCapabilities.Cap.EXPONENTIAL_HISTOGRAM.capabilityName())
434+
List.of(EsqlCapabilities.Cap.EXPONENTIAL_HISTOGRAM_PRE_TECH_PREVIEW_V1.capabilityName())
435435
);
436436
} catch (IOException e) {
437437
throw new RuntimeException(e);

x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/EsqlSpecIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected boolean supportsSourceFieldMapping() {
5656

5757
@Override
5858
protected boolean supportsExponentialHistograms() {
59-
return RestEsqlTestCase.hasCapabilities(client(), List.of(EsqlCapabilities.Cap.EXPONENTIAL_HISTOGRAM.capabilityName()));
59+
return RestEsqlTestCase.hasCapabilities(client(), List.of(EsqlCapabilities.Cap.EXPONENTIAL_HISTOGRAM_PRE_TECH_PREVIEW_V1.capabilityName()));
6060
}
6161

6262
@Before

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ protected boolean supportsSourceFieldMapping() throws IOException {
287287
}
288288

289289
protected boolean supportsExponentialHistograms() {
290-
return RestEsqlTestCase.hasCapabilities(client(), List.of(EsqlCapabilities.Cap.EXPONENTIAL_HISTOGRAM.capabilityName()));
290+
return RestEsqlTestCase.hasCapabilities(client(), List.of(EsqlCapabilities.Cap.EXPONENTIAL_HISTOGRAM_PRE_TECH_PREVIEW_V1.capabilityName()));
291291
}
292292

293293
protected void doTest() throws Throwable {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,6 @@ fieldsInOtherIndicesBug
651651
required_capability: enrich_load
652652
required_capability: fix_replace_missing_field_with_null_duplicate_name_id_in_layout
653653
required_capability: dense_vector_agg_metric_double_if_fns
654-
required_capability: exponential_histogram
655654

656655
from *
657656
| keep author.keyword, book_no, scalerank, street, bytes_in, @timestamp, abbrev, city_location, distance, description, birth_date, language_code, intersects, client_ip, event_duration, version

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
loadFiltered
2-
required_capability: exponential_histogram_topn
2+
required_capability: exponential_histogram_pre_tech_preview_v1
33

44
FROM exp_histo_sample | WHERE STARTS_WITH(instance, "dummy") | SORT instance | KEEP instance, responseTime
55
;
@@ -17,7 +17,7 @@ dummy-zero_threshold_only | "{""scale"":0,""sum"":0.0,""zero"":{""threshold"":2.
1717

1818

1919
allAggsGrouped
20-
required_capability: exponential_histogram_sum_avg_support
20+
required_capability: exponential_histogram_pre_tech_preview_v1
2121

2222
FROM exp_histo_sample
2323
| EVAL instance = CASE(STARTS_WITH(instance, "dummy"), "dummy-grouped", instance)
@@ -37,7 +37,7 @@ instance-2 | 2.2E-4 | 2.744054 | 0.0016068 | 27.706021000000003 | 0
3737

3838

3939
allAggsInlineGrouped
40-
required_capability: exponential_histogram_sum_avg_support
40+
required_capability: exponential_histogram_pre_tech_preview_v1
4141

4242
FROM exp_histo_sample
4343
| INLINE STATS min = MIN(responseTime), max = MAX(responseTime), p75 = PERCENTILE(responseTime,75), sum = SUM(responseTime), avg = AVG(responseTime) BY instance
@@ -68,7 +68,7 @@ instance-0 | 2.4E-4 | 6.786232 | 0.2608237 | 1472.744209
6868

6969

7070
allAggsOnEmptyHistogram
71-
required_capability: exponential_histogram_minmax_support
71+
required_capability: exponential_histogram_pre_tech_preview_v1
7272

7373
FROM exp_histo_sample | WHERE instance == "dummy-empty"
7474
| STATS min = MIN(responseTime), max = MAX(responseTime), p75 = PERCENTILE(responseTime,75)
@@ -82,7 +82,7 @@ NULL | NULL | NULL
8282

8383

8484
ungroupedPercentiles
85-
required_capability: exponential_histogram_percentiles_support
85+
required_capability: exponential_histogram_pre_tech_preview_v1
8686

8787
FROM exp_histo_sample | WHERE NOT STARTS_WITH(instance, "dummy")
8888
| STATS p0 = PERCENTILE(responseTime,0), p50 = PERCENTILE(responseTime,50), p99 = PERCENTILE(responseTime, 99), p100 = PERCENTILE(responseTime,100)
@@ -97,7 +97,7 @@ p0:double | p50:double | p99:double | p100:double
9797

9898

9999
groupedPercentiles
100-
required_capability: exponential_histogram_percentiles_support
100+
required_capability: exponential_histogram_pre_tech_preview_v1
101101

102102
FROM exp_histo_sample | WHERE NOT STARTS_WITH(instance, "dummy")
103103
| STATS p0 = PERCENTILE(responseTime,0), p50 = PERCENTILE(responseTime,50), p99 = PERCENTILE(responseTime, 99), p100 = PERCENTILE(responseTime,100) BY instance
@@ -115,7 +115,7 @@ instance-2 | 2.2E-4 | 6.469E-4 | 0.0857672 | 2.7059714542564097
115115

116116

117117
percentileOnEmptyHistogram
118-
required_capability: exponential_histogram_percentiles_support
118+
required_capability: exponential_histogram_pre_tech_preview_v1
119119

120120
FROM exp_histo_sample | WHERE instance == "dummy-empty"
121121
| STATS p50 = PERCENTILE(responseTime,50)
@@ -129,7 +129,7 @@ NULL
129129

130130

131131
ungroupedMinMax
132-
required_capability: exponential_histogram_minmax_support
132+
required_capability: exponential_histogram_pre_tech_preview_v1
133133

134134
FROM exp_histo_sample | WHERE NOT STARTS_WITH(instance, "dummy")
135135
| STATS min = MIN(responseTime), max = MAX(responseTime)
@@ -143,7 +143,7 @@ min:double | max:double
143143

144144

145145
groupedMinMax
146-
required_capability: exponential_histogram_minmax_support
146+
required_capability: exponential_histogram_pre_tech_preview_v1
147147

148148
FROM exp_histo_sample | WHERE NOT STARTS_WITH(instance, "dummy")
149149
| STATS min = MIN(responseTime), max = MAX(responseTime) BY instance
@@ -160,7 +160,7 @@ instance-2 | 2.2E-4 | 2.744054
160160

161161

162162
minMaxOnEmptyHistogram
163-
required_capability: exponential_histogram_minmax_support
163+
required_capability: exponential_histogram_pre_tech_preview_v1
164164

165165
FROM exp_histo_sample | WHERE instance == "dummy-empty"
166166
| STATS min = MIN(responseTime), max = MAX(responseTime)
@@ -173,7 +173,7 @@ NULL | NULL
173173

174174

175175
ungroupedAvg
176-
required_capability: exponential_histogram_sum_avg_support
176+
required_capability: exponential_histogram_pre_tech_preview_v1
177177

178178
FROM exp_histo_sample | WHERE NOT STARTS_WITH(instance, "dummy")
179179
| STATS avg = AVG(responseTime)
@@ -186,7 +186,7 @@ avg:double
186186

187187

188188
groupedAvg
189-
required_capability: exponential_histogram_sum_avg_support
189+
required_capability: exponential_histogram_pre_tech_preview_v1
190190

191191
FROM exp_histo_sample | WHERE NOT STARTS_WITH(instance, "dummy")
192192
| STATS avg = AVG(responseTime) BY instance
@@ -202,7 +202,7 @@ instance-2 | 0.008197047633136096
202202

203203

204204
avgOnEmptyHistogram
205-
required_capability: exponential_histogram_sum_avg_support
205+
required_capability: exponential_histogram_pre_tech_preview_v1
206206

207207
FROM exp_histo_sample | WHERE instance == "dummy-empty"
208208
| STATS avg = AVG(responseTime)
@@ -215,7 +215,7 @@ NULL
215215

216216

217217
ungroupedSum
218-
required_capability: exponential_histogram_sum_avg_support
218+
required_capability: exponential_histogram_pre_tech_preview_v1
219219

220220
FROM exp_histo_sample | WHERE NOT STARTS_WITH(instance, "dummy")
221221
| STATS sum = SUM(responseTime)
@@ -228,7 +228,7 @@ sum:double
228228

229229

230230
groupedSum
231-
required_capability: exponential_histogram_sum_avg_support
231+
required_capability: exponential_histogram_pre_tech_preview_v1
232232

233233
FROM exp_histo_sample | WHERE NOT STARTS_WITH(instance, "dummy")
234234
| STATS sum = SUM(responseTime) BY instance

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,6 @@ enrichLookupStatsBug
16921692
required_capability: join_lookup_v12
16931693
required_capability: fix_replace_missing_field_with_null_duplicate_name_id_in_layout
16941694
required_capability: dense_vector_agg_metric_double_if_fns
1695-
required_capability: exponential_histogram
16961695

16971696
from *
16981697
| enrich languages_policy on cluster

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,29 +1554,11 @@ public enum Cap {
15541554
PACK_DIMENSIONS_IN_TS,
15551555

15561556
/**
1557-
* Support for exponential_histogram type
1557+
* Support for exponential_histogram type, before it is released into tech preview.
1558+
* When implementing changes on this type, we'll simply increment the version suffix at the end to prevent bwc tests from running.
1559+
* As soon as we move into tech preview, we'll replace this capability with a "EXPONENTIAL_HISTOGRAM_TECH_PREVIEW" one.
15581560
*/
1559-
EXPONENTIAL_HISTOGRAM(EXPONENTIAL_HISTOGRAM_FEATURE_FLAG),
1560-
1561-
/**
1562-
* Support for exponential_histogram type in TOPN
1563-
*/
1564-
EXPONENTIAL_HISTOGRAM_TOPN(EXPONENTIAL_HISTOGRAM_FEATURE_FLAG),
1565-
1566-
/**
1567-
* Support for exponential_histogram type in PERCENTILES aggregation.
1568-
*/
1569-
EXPONENTIAL_HISTOGRAM_PERCENTILES_SUPPORT(EXPONENTIAL_HISTOGRAM_FEATURE_FLAG),
1570-
1571-
/**
1572-
* Support for exponential_histogram type in MIN/MAX aggregation.
1573-
*/
1574-
EXPONENTIAL_HISTOGRAM_MINMAX_SUPPORT(EXPONENTIAL_HISTOGRAM_FEATURE_FLAG),
1575-
1576-
/**
1577-
* Support for exponential_histogram type in SUM and AVG aggregation.
1578-
*/
1579-
EXPONENTIAL_HISTOGRAM_SUM_AVG_SUPPORT(EXPONENTIAL_HISTOGRAM_FEATURE_FLAG),
1561+
EXPONENTIAL_HISTOGRAM_PRE_TECH_PREVIEW_V1(EXPONENTIAL_HISTOGRAM_FEATURE_FLAG),
15801562

15811563
/**
15821564
* Create new block when filtering OrdinalBytesRefBlock

0 commit comments

Comments
 (0)