Skip to content

Commit 6c7e01d

Browse files
committed
Remove assumeTrues
1 parent 799b007 commit 6c7e01d

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,6 @@ public void testMatchFilter() throws Exception {
10891089
}
10901090

10911091
public void testMatchFunctionNotAllowedAfterCommands() throws Exception {
1092-
assumeTrue("skipping because MATCH is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
1093-
10941092
assertEquals(
10951093
"1:24: [MATCH] function cannot be used after LIMIT",
10961094
error("from test | limit 10 | where match(first_name, \"Anna\")")
@@ -1193,8 +1191,6 @@ public void testQueryStringWithDisjunctions() {
11931191
}
11941192

11951193
public void testMatchWithDisjunctions() {
1196-
assumeTrue("skipping because MATCH is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
1197-
11981194
checkWithDisjunctions("MATCH", "match(first_name, \"Anna\")");
11991195
}
12001196

@@ -1239,8 +1235,6 @@ public void testQueryStringFunctionWithNonBooleanFunctions() {
12391235
}
12401236

12411237
public void testMatchFunctionWithNonBooleanFunctions() {
1242-
assumeTrue("skipping because MATCH is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
1243-
12441238
checkFullTextFunctionsWithNonBooleanFunctions("MATCH", "match(first_name, \"Anna\")");
12451239
}
12461240

@@ -1264,8 +1258,6 @@ private void checkFullTextFunctionsWithNonBooleanFunctions(String functionName,
12641258
}
12651259

12661260
public void testMatchFunctionArgNotConstant() throws Exception {
1267-
assumeTrue("skipping because MATCH is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
1268-
12691261
assertEquals(
12701262
"1:19: second argument of [match(first_name, first_name)] must be a constant, received [first_name]",
12711263
error("from test | where match(first_name, first_name)")
@@ -1279,17 +1271,13 @@ public void testMatchFunctionArgNotConstant() throws Exception {
12791271

12801272
// These should pass eventually once we lift some restrictions on match function
12811273
public void testMatchFunctionCurrentlyUnsupportedBehaviour() throws Exception {
1282-
assumeTrue("skipping because MATCH is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
1283-
12841274
assertEquals(
12851275
"1:68: Unknown column [first_name]",
12861276
error("from test | stats max_salary = max(salary) by emp_no | where match(first_name, \"Anna\")")
12871277
);
12881278
}
12891279

12901280
public void testMatchFunctionNullArgs() throws Exception {
1291-
assumeTrue("skipping because MATCH is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
1292-
12931281
assertEquals(
12941282
"1:19: first argument of [match(null, \"query\")] cannot be null, received [null]",
12951283
error("from test | where match(null, \"query\")")
@@ -1301,8 +1289,6 @@ public void testMatchFunctionNullArgs() throws Exception {
13011289
}
13021290

13031291
public void testMatchFunctionTargetsExistingField() throws Exception {
1304-
assumeTrue("skipping because MATCH is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
1305-
13061292
assertEquals("1:39: Unknown column [first_name]", error("from test | keep emp_no | where match(first_name, \"Anna\")"));
13071293
}
13081294

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.elasticsearch.xpack.core.enrich.EnrichPolicy;
2626
import org.elasticsearch.xpack.esql.EsqlTestUtils;
2727
import org.elasticsearch.xpack.esql.EsqlTestUtils.TestSearchStats;
28-
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
2928
import org.elasticsearch.xpack.esql.analysis.Analyzer;
3029
import org.elasticsearch.xpack.esql.analysis.AnalyzerContext;
3130
import org.elasticsearch.xpack.esql.analysis.EnrichResolution;
@@ -545,7 +544,6 @@ public void testQueryStringFunctionMultipleQstrClauses() {
545544
* \_EsQueryExec[test], indexMode[standard], query[{"match":{"last_name":{"query":"Smith"}}}]
546545
*/
547546
public void testMatchFunction() {
548-
assumeTrue("skipping because MATCH function is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
549547
var plan = plannerOptimizer.plan("""
550548
from test
551549
| where match(last_name, "Smith")
@@ -574,7 +572,6 @@ public void testMatchFunction() {
574572
* "source":"emp_no > 10010@2:39"}}],"boost":1.0}}][_doc{f}#14], limit[1000], sort[] estimatedRowSize[324]
575573
*/
576574
public void testMatchFunctionConjunctionWhereOperands() {
577-
assumeTrue("skipping because MATCH function is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
578575
String queryText = """
579576
from test
580577
| where match(last_name, "Smith") and emp_no > 10010
@@ -609,7 +606,6 @@ public void testMatchFunctionConjunctionWhereOperands() {
609606
* "source":"cidr_match(ip, \"127.0.0.1/32\")@2:33"}}],"boost":1.0}}][_doc{f}#22], limit[1000], sort[] estimatedRowSize[354]
610607
*/
611608
public void testMatchFunctionWithFunctionsPushedToLucene() {
612-
assumeTrue("skipping because MATCH function is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
613609
String queryText = """
614610
from test
615611
| where match(text, "beta") and cidr_match(ip, "127.0.0.1/32")
@@ -644,7 +640,6 @@ public void testMatchFunctionWithFunctionsPushedToLucene() {
644640
* "source":"emp_no > 10010@3:9"}}],"boost":1.0}}][_doc{f}#14], limit[1000], sort[] estimatedRowSize[324]
645641
*/
646642
public void testMatchFunctionMultipleWhereClauses() {
647-
assumeTrue("skipping because MATCH function is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
648643
String queryText = """
649644
from test
650645
| where match(last_name, "Smith")
@@ -678,7 +673,6 @@ public void testMatchFunctionMultipleWhereClauses() {
678673
* {"match":{"first_name":{"query":"John"}}}],"boost":1.0}}][_doc{f}#14], limit[1000], sort[] estimatedRowSize[324]
679674
*/
680675
public void testMatchFunctionMultipleQstrClauses() {
681-
assumeTrue("skipping because MATCH function is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
682676
String queryText = """
683677
from test
684678
| where match(last_name, "Smith") and match(first_name, "John")

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.elasticsearch.xpack.esql.EsqlTestUtils;
1919
import org.elasticsearch.xpack.esql.TestBlockFactory;
2020
import org.elasticsearch.xpack.esql.VerificationException;
21-
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
2221
import org.elasticsearch.xpack.esql.analysis.Analyzer;
2322
import org.elasticsearch.xpack.esql.analysis.AnalyzerContext;
2423
import org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils;
@@ -5568,8 +5567,6 @@ public void testToDatePeriodToTimeDurationWithField() {
55685567

55695568
// These should pass eventually once we lift some restrictions on match function
55705569
public void testMatchWithNonIndexedColumnCurrentlyUnsupported() {
5571-
assumeTrue("skipping because MATCH function is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
5572-
55735570
final String header = "Found 1 problem\nline ";
55745571
VerificationException e = expectThrows(VerificationException.class, () -> plan("""
55755572
from test | eval initial = substring(first_name, 1) | where match(initial, "A")"""));
@@ -5589,8 +5586,6 @@ public void testMatchWithNonIndexedColumnCurrentlyUnsupported() {
55895586
}
55905587

55915588
public void testMatchFunctionIsNotNullable() {
5592-
assumeTrue("skipping because MATCH function is not enabled", EsqlCapabilities.Cap.MATCH_FUNCTION.isEnabled());
5593-
55945589
String queryText = """
55955590
row n = null | eval text = n + 5 | where match(text::keyword, "Anna")
55965591
""";

0 commit comments

Comments
 (0)