Skip to content

Commit 4b8b83d

Browse files
authored
ESQL: Add capability to prevent failing tests after Starts/EndsWith pushdown (#124869)
1 parent 5b85555 commit 4b8b83d

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
@@ -992,6 +992,7 @@ beta | Kubernetes cluster
992992
;
993993

994994
startsWithLucenePushdownIgnoreMultivalues
995+
required_capability: starts_with_ends_with_lucene_pushdown
995996

996997
from hosts
997998
| where starts_with(description, "epsilon")
@@ -1260,6 +1261,7 @@ beta | Kubernetes cluster
12601261
;
12611262

12621263
endsWithLucenePushdownIgnoreMultivalues
1264+
required_capability: starts_with_ends_with_lucene_pushdown
12631265

12641266
from hosts
12651267
| 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
@@ -710,6 +710,12 @@ public enum Cap {
710710
*/
711711
MIXED_NUMERIC_TYPES_IN_CASE_GREATEST_LEAST,
712712

713+
/**
714+
* Lucene query pushdown to StartsWith and EndsWith functions.
715+
* This capability was created to avoid receiving wrong warnings from old nodes in mixed clusters
716+
*/
717+
STARTS_WITH_ENDS_WITH_LUCENE_PUSHDOWN,
718+
713719
/**
714720
* Full text functions can be scored when being part of a disjunction
715721
*/

0 commit comments

Comments
 (0)