Skip to content

Commit 342f989

Browse files
authored
Fix release tests for OptimizerVerificationTests (#133100)
* Fix release tests for OptimizerVerificationTests
1 parent d2387cf commit 342f989

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,6 @@ tests:
585585
- class: org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT
586586
method: test {p0=search/160_exists_query/Test exists query on _id field}
587587
issue: https://github.com/elastic/elasticsearch/issues/133097
588-
- class: org.elasticsearch.xpack.esql.optimizer.OptimizerVerificationTests
589-
method: testRemoteEnrichAfterCoordinatorOnlyPlans
590-
issue: https://github.com/elastic/elasticsearch/issues/133015
591588
- class: org.elasticsearch.xpack.esql.analysis.AnalyzerTests
592589
method: testNoDenseVectorFailsForMagnitude
593590
issue: https://github.com/elastic/elasticsearch/issues/133013

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.defaultLookupResolution;
2828
import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.loadEnrichPolicyResolution;
2929
import static org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils.loadMapping;
30+
import static org.elasticsearch.xpack.esql.plugin.EsqlPlugin.INLINESTATS_FEATURE_FLAG;
3031
import static org.hamcrest.Matchers.containsString;
3132
import static org.hamcrest.Matchers.instanceOf;
3233

@@ -125,16 +126,18 @@ public void testRemoteEnrichAfterCoordinatorOnlyPlans() {
125126
""", analyzer);
126127
assertThat(err, containsString("4:3: ENRICH with remote policy can't be executed after [STATS count(*) BY language_code]@3:3"));
127128

128-
err = error("""
129-
FROM test
130-
| EVAL language_code = languages
131-
| INLINESTATS count(*) BY language_code
132-
| ENRICH _remote:languages ON language_code
133-
""", analyzer);
134-
assertThat(
135-
err,
136-
containsString("4:3: ENRICH with remote policy can't be executed after [INLINESTATS count(*) BY language_code]@3:3")
137-
);
129+
if (INLINESTATS_FEATURE_FLAG) {
130+
err = error("""
131+
FROM test
132+
| EVAL language_code = languages
133+
| INLINESTATS count(*) BY language_code
134+
| ENRICH _remote:languages ON language_code
135+
""", analyzer);
136+
assertThat(
137+
err,
138+
containsString("4:3: ENRICH with remote policy can't be executed after [INLINESTATS count(*) BY language_code]@3:3")
139+
);
140+
}
138141

139142
err = error("""
140143
FROM test

0 commit comments

Comments
 (0)