Skip to content

Commit bb8503a

Browse files
authored
ESQL: Fix lookup optimizer tests on release (elastic#118742)
Fix elastic#118721 * Skip corresponding optimizer tests if `LOOKUP JOIN` is disabled. * Enable LogicalPlanOptimizerTests again.
1 parent 21c238b commit bb8503a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

muted-tests.yml

-2
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,6 @@ tests:
302302
- class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests
303303
method: testInvalidJSON
304304
issue: https://github.com/elastic/elasticsearch/issues/116521
305-
- class: org.elasticsearch.xpack.esql.optimizer.LogicalPlanOptimizerTests
306-
issue: https://github.com/elastic/elasticsearch/issues/118721
307305

308306
# Examples:
309307
#

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

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.elasticsearch.xpack.esql.EsqlTestUtils;
2222
import org.elasticsearch.xpack.esql.TestBlockFactory;
2323
import org.elasticsearch.xpack.esql.VerificationException;
24+
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
2425
import org.elasticsearch.xpack.esql.analysis.Analyzer;
2526
import org.elasticsearch.xpack.esql.analysis.AnalyzerContext;
2627
import org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils;
@@ -4910,6 +4911,8 @@ public void testPlanSanityCheck() throws Exception {
49104911
}
49114912

49124913
public void testPlanSanityCheckWithBinaryPlans() throws Exception {
4914+
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());
4915+
49134916
var plan = optimizedPlan("""
49144917
FROM test
49154918
| RENAME languages AS language_code
@@ -5913,6 +5916,8 @@ public void testLookupStats() {
59135916
* \_EsRelation[language_code][LOOKUP][language_code{f}#18, language_name{f}#19]
59145917
*/
59155918
public void testLookupJoinPushDownFilterOnJoinKeyWithRename() {
5919+
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());
5920+
59165921
String query = """
59175922
FROM test
59185923
| RENAME languages AS language_code
@@ -5954,6 +5959,8 @@ public void testLookupJoinPushDownFilterOnJoinKeyWithRename() {
59545959
* \_EsRelation[language_code][LOOKUP][language_code{f}#18, language_name{f}#19]
59555960
*/
59565961
public void testLookupJoinPushDownFilterOnLeftSideField() {
5962+
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());
5963+
59575964
String query = """
59585965
FROM test
59595966
| RENAME languages AS language_code
@@ -5996,6 +6003,8 @@ public void testLookupJoinPushDownFilterOnLeftSideField() {
59966003
* \_EsRelation[language_code][LOOKUP][language_code{f}#18, language_name{f}#19]
59976004
*/
59986005
public void testLookupJoinPushDownDisabledForLookupField() {
6006+
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());
6007+
59996008
String query = """
60006009
FROM test
60016010
| RENAME languages AS language_code
@@ -6039,6 +6048,8 @@ public void testLookupJoinPushDownDisabledForLookupField() {
60396048
* \_EsRelation[language_code][LOOKUP][language_code{f}#19, language_name{f}#20]
60406049
*/
60416050
public void testLookupJoinPushDownSeparatedForConjunctionBetweenLeftAndRightField() {
6051+
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());
6052+
60426053
String query = """
60436054
FROM test
60446055
| RENAME languages AS language_code
@@ -6090,6 +6101,8 @@ public void testLookupJoinPushDownSeparatedForConjunctionBetweenLeftAndRightFiel
60906101
* \_EsRelation[language_code][LOOKUP][language_code{f}#19, language_name{f}#20]
60916102
*/
60926103
public void testLookupJoinPushDownDisabledForDisjunctionBetweenLeftAndRightField() {
6104+
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());
6105+
60936106
String query = """
60946107
FROM test
60956108
| RENAME languages AS language_code

0 commit comments

Comments
 (0)