Skip to content

Commit 3b62845

Browse files
Fixes for failing FieldNameUtilsTests due to snapshot operators being tested (#132727)
* Addresses #132711
1 parent 173d2c1 commit 3b62845

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/session/FieldNameUtilsTests.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,6 +2243,8 @@ public void testForkRef4() {
22432243
}
22442244

22452245
public void testRerankerAfterFuse() {
2246+
assumeTrue("FUSE required", EsqlCapabilities.Cap.FUSE.isEnabled());
2247+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
22462248
assertFieldNames("""
22472249
FROM books METADATA _id, _index, _score
22482250
| FORK ( WHERE title:"Tolkien" | SORT _score, _id DESC | LIMIT 3 )
@@ -2256,6 +2258,8 @@ public void testRerankerAfterFuse() {
22562258
}
22572259

22582260
public void testSimpleFuse() {
2261+
assumeTrue("FUSE required", EsqlCapabilities.Cap.FUSE.isEnabled());
2262+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
22592263
assertFieldNames("""
22602264
FROM employees METADATA _id, _index, _score
22612265
| FORK ( WHERE emp_no:10001 )
@@ -2267,6 +2271,8 @@ public void testSimpleFuse() {
22672271
}
22682272

22692273
public void testFuseWithMatchAndScore() {
2274+
assumeTrue("FUSE required", EsqlCapabilities.Cap.FUSE.isEnabled());
2275+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
22702276
assertFieldNames("""
22712277
FROM books METADATA _id, _index, _score
22722278
| FORK ( WHERE title:"Tolkien" | SORT _score, _id DESC | LIMIT 3 )
@@ -2279,6 +2285,8 @@ public void testFuseWithMatchAndScore() {
22792285
}
22802286

22812287
public void testFuseWithDisjunctionAndPostFilter() {
2288+
assumeTrue("FUSE required", EsqlCapabilities.Cap.FUSE.isEnabled());
2289+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
22822290
assertFieldNames("""
22832291
FROM books METADATA _id, _index, _score
22842292
| FORK ( WHERE title:"Tolkien" OR author:"Tolkien" | SORT _score, _id DESC | LIMIT 3 )
@@ -2292,6 +2300,8 @@ public void testFuseWithDisjunctionAndPostFilter() {
22922300
}
22932301

22942302
public void testFuseWithStats() {
2303+
assumeTrue("FUSE required", EsqlCapabilities.Cap.FUSE.isEnabled());
2304+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
22952305
assertFieldNames("""
22962306
FROM books METADATA _id, _index, _score
22972307
| FORK ( WHERE title:"Tolkien" | SORT _score, _id DESC | LIMIT 3 )
@@ -2303,6 +2313,8 @@ public void testFuseWithStats() {
23032313
}
23042314

23052315
public void testFuseWithMultipleForkBranches() {
2316+
assumeTrue("FUSE required", EsqlCapabilities.Cap.FUSE.isEnabled());
2317+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
23062318
assertFieldNames("""
23072319
FROM books METADATA _id, _index, _score
23082320
| FORK (WHERE author:"Keith Faulkner" AND qstr("author:Rory or author:Beverlie") | SORT _score, _id DESC | LIMIT 3)
@@ -2318,6 +2330,8 @@ public void testFuseWithMultipleForkBranches() {
23182330
}
23192331

23202332
public void testFuseWithSemanticSearch() {
2333+
assumeTrue("FUSE required", EsqlCapabilities.Cap.FUSE.isEnabled());
2334+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
23212335
assertFieldNames("""
23222336
FROM semantic_text METADATA _id, _score, _index
23232337
| FORK ( WHERE semantic_text_field:"something" | SORT _score DESC | LIMIT 2)
@@ -2503,6 +2517,8 @@ public void testForkWithUnsupportedAttributes() {
25032517
}
25042518

25052519
public void testForkAfterLookupJoin() {
2520+
assumeTrue("LOOKUP JOIN available as snapshot only", EsqlCapabilities.Cap.JOIN_LOOKUP_V12.isEnabled());
2521+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
25062522
assertFieldNames(
25072523
"""
25082524
FROM employees
@@ -2529,6 +2545,8 @@ public void testForkAfterLookupJoin() {
25292545
}
25302546

25312547
public void testForkBeforeLookupJoin() {
2548+
assumeTrue("LOOKUP JOIN available as snapshot only", EsqlCapabilities.Cap.JOIN_LOOKUP_V12.isEnabled());
2549+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
25322550
assertFieldNames(
25332551
"""
25342552
FROM employees
@@ -2555,6 +2573,8 @@ public void testForkBeforeLookupJoin() {
25552573
}
25562574

25572575
public void testForkBranchWithLookupJoin() {
2576+
assumeTrue("LOOKUP JOIN available as snapshot only", EsqlCapabilities.Cap.JOIN_LOOKUP_V12.isEnabled());
2577+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
25582578
assertFieldNames(
25592579
"""
25602580
FROM employees
@@ -2826,6 +2846,8 @@ public void testForkAfterMvExpand() {
28262846
}
28272847

28282848
public void testForkBeforeInlineStatsIgnore() {
2849+
assumeTrue("INLINESTATS required", EsqlCapabilities.Cap.INLINESTATS_V9.isEnabled());
2850+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
28292851
assertFieldNames("""
28302852
FROM employees
28312853
| KEEP emp_no, languages, gender
@@ -2837,6 +2859,8 @@ public void testForkBeforeInlineStatsIgnore() {
28372859
}
28382860

28392861
public void testForkBranchWithInlineStatsIgnore() {
2862+
assumeTrue("INLINESTATS required", EsqlCapabilities.Cap.INLINESTATS_V9.isEnabled());
2863+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
28402864
assertFieldNames("""
28412865
FROM employees
28422866
| KEEP emp_no, languages, gender
@@ -2849,6 +2873,8 @@ public void testForkBranchWithInlineStatsIgnore() {
28492873
}
28502874

28512875
public void testForkAfterInlineStatsIgnore() {
2876+
assumeTrue("INLINESTATS required", EsqlCapabilities.Cap.INLINESTATS_V9.isEnabled());
2877+
assertTrue("FORK required", EsqlCapabilities.Cap.FORK_V9.isEnabled());
28522878
assertFieldNames("""
28532879
FROM employees
28542880
| KEEP emp_no, languages, gender

0 commit comments

Comments
 (0)