diff --git a/muted-tests.yml b/muted-tests.yml index 8d9dcdedc8105..70054a292efb2 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -585,9 +585,6 @@ tests: - class: org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT method: test {p0=search/160_exists_query/Test exists query on _id field} issue: https://github.com/elastic/elasticsearch/issues/133097 -- class: org.elasticsearch.xpack.esql.optimizer.OptimizerVerificationTests - method: testRemoteEnrichAfterCoordinatorOnlyPlans - issue: https://github.com/elastic/elasticsearch/issues/133015 - class: org.elasticsearch.xpack.esql.analysis.AnalyzerTests method: testNoDenseVectorFailsForMagnitude issue: https://github.com/elastic/elasticsearch/issues/133013 diff --git a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/OptimizerVerificationTests.java b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/OptimizerVerificationTests.java index fcfe4a0a2a455..9887588404c88 100644 --- a/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/OptimizerVerificationTests.java +++ b/x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/OptimizerVerificationTests.java @@ -27,6 +27,7 @@ import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.defaultLookupResolution; import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.loadEnrichPolicyResolution; import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.loadMapping; +import static org.elasticsearch.xpack.esql.plugin.EsqlPlugin.INLINESTATS_FEATURE_FLAG; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.instanceOf; @@ -125,16 +126,18 @@ public void testRemoteEnrichAfterCoordinatorOnlyPlans() { """, analyzer); assertThat(err, containsString("4:3: ENRICH with remote policy can't be executed after [STATS count(*) BY language_code]@3:3")); - err = error(""" - FROM test - | EVAL language_code = languages - | INLINESTATS count(*) BY language_code - | ENRICH _remote:languages ON language_code - """, analyzer); - assertThat( - err, - containsString("4:3: ENRICH with remote policy can't be executed after [INLINESTATS count(*) BY language_code]@3:3") - ); + if (INLINESTATS_FEATURE_FLAG) { + err = error(""" + FROM test + | EVAL language_code = languages + | INLINESTATS count(*) BY language_code + | ENRICH _remote:languages ON language_code + """, analyzer); + assertThat( + err, + containsString("4:3: ENRICH with remote policy can't be executed after [INLINESTATS count(*) BY language_code]@3:3") + ); + } err = error(""" FROM test