Skip to content

Commit f781748

Browse files
authored
ESQL: Add capability to prevent failing tests after Starts/EndsWith pushdown (elastic#124870)
1 parent 8a8e641 commit f781748

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ beta | Kubernetes cluster
980980
;
981981

982982
startsWithLucenePushdownIgnoreMultivalues
983+
required_capability: starts_with_ends_with_lucene_pushdown
983984

984985
from hosts
985986
| where starts_with(description, "epsilon")
@@ -1246,6 +1247,7 @@ beta | Kubernetes cluster
12461247
;
12471248

12481249
endsWithLucenePushdownIgnoreMultivalues
1250+
required_capability: starts_with_ends_with_lucene_pushdown
12491251

12501252
from hosts
12511253
| where ends_with(description, "host")

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,12 @@ public enum Cap {
826826
*/
827827
MIXED_NUMERIC_TYPES_IN_CASE_GREATEST_LEAST,
828828

829+
/**
830+
* Lucene query pushdown to StartsWith and EndsWith functions.
831+
* This capability was created to avoid receiving wrong warnings from old nodes in mixed clusters
832+
*/
833+
STARTS_WITH_ENDS_WITH_LUCENE_PUSHDOWN,
834+
829835
/**
830836
* Full text functions can be scored when being part of a disjunction
831837
*/

0 commit comments

Comments
 (0)