Skip to content

Commit 86c1138

Browse files
committed
add capability
1 parent 5e326da commit 86c1138

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// because the CSV tests don't support such assertions.
77

88
approximate stats on large data
9+
required_capability: approximate
910
approximate: true
1011

1112
FROM many_numbers
@@ -24,6 +25,7 @@ true
2425

2526

2627
exact stats on small data
28+
required_capability: approximate
2729
approximate: true
2830

2931
FROM many_numbers
@@ -37,6 +39,7 @@ count:long | avg:double | sum:long | min:integer | max:integer
3739

3840

3941
with where
42+
required_capability: approximate
4043
approximate: true
4144

4245
FROM many_numbers
@@ -56,6 +59,7 @@ true
5659

5760

5861
with sample
62+
required_capability: approximate
5963
approximate: true
6064

6165
FROM many_numbers
@@ -75,6 +79,7 @@ true
7579

7680

7781
with commands inbetween
82+
required_capability: approximate
7883
approximate: true
7984

8085
FROM many_numbers
@@ -101,6 +106,7 @@ true
101106

102107

103108
with commands after
109+
required_capability: approximate
104110
approximate: true
105111

106112
FROM many_numbers
@@ -123,6 +129,7 @@ true
123129

124130

125131
approximate stats by on large data
132+
required_capability: approximate
126133
approximate: true
127134

128135
FROM many_numbers
@@ -143,6 +150,7 @@ num:integer | is_expected:boolean
143150

144151

145152
exact stats by on small data
153+
required_capability: approximate
146154
approximate: true
147155

148156
FROM many_numbers

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
@@ -1389,7 +1389,12 @@ public enum Cap {
13891389
/**
13901390
* Support for vector Hamming distance.
13911391
*/
1392-
HAMMING_VECTOR_SIMILARITY_FUNCTION(Build.current().isSnapshot());
1392+
HAMMING_VECTOR_SIMILARITY_FUNCTION(Build.current().isSnapshot()),
1393+
1394+
/**
1395+
* Support query approximation.
1396+
*/
1397+
APPROXIMATE;
13931398

13941399
private final boolean enabled;
13951400

0 commit comments

Comments
 (0)