Skip to content

Commit e905a79

Browse files
committed
capability
1 parent c5fd3cb commit e905a79

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
detect nothing (long)
2-
// TODO: required_capability: change_point
2+
required_capability: change_point
33

44
FROM k8s
55
| STATS count=COUNT() BY @timestamp=BUCKET(@timestamp, 1 MINUTE)
@@ -34,7 +34,7 @@ count:long | @timestamp:datetime | type:text | pvalue:double
3434

3535

3636
detect spike (long)
37-
// TODO: required_capability: change_point
37+
required_capability: change_point
3838

3939
FROM k8s
4040
| STATS count=COUNT() BY @timestamp=BUCKET(@timestamp, 1 MINUTE)
@@ -70,7 +70,7 @@ FROM k8s
7070

7171

7272
detect step change (long)
73-
// TODO: required_capability: change_point
73+
required_capability: change_point
7474

7575
FROM k8s
7676
| STATS count=COUNT() BY @timestamp=BUCKET(@timestamp, 1 MINUTE)
@@ -106,7 +106,7 @@ FROM k8s
106106

107107

108108
detect dip (double)
109-
// TODO: required_capability: change_point
109+
required_capability: change_point
110110

111111
FROM employees
112112
| STATS salary=AVG(salary) BY height
@@ -173,7 +173,7 @@ height:double | salary:double | type:text | pvalue:double
173173

174174

175175
reuse column names
176-
// TODO: required_capability: change_point
176+
required_capability: change_point
177177

178178
FROM k8s
179179
| STATS count=COUNT() BY @timestamp=BUCKET(@timestamp, 1 MINUTE)
@@ -209,7 +209,7 @@ null | null
209209

210210

211211
not enough data
212-
// TODO: required_capability: change_point
212+
required_capability: change_point
213213

214214
FROM k8s
215215
| STATS count=COUNT() BY @timestamp=BUCKET(@timestamp, 10 MINUTES)

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,12 @@ public enum Cap {
784784
/**
785785
* Support for aggregate_metric_double type
786786
*/
787-
AGGREGATE_METRIC_DOUBLE;
787+
AGGREGATE_METRIC_DOUBLE,
788+
789+
/**
790+
* Support change point detection "CHANGE_POINT".
791+
*/
792+
CHANGE_POINT(Build.current().isSnapshot());
788793

789794
private final boolean enabled;
790795

0 commit comments

Comments
 (0)