Skip to content

Commit

Permalink
ESQL: Fix lookup optimizer tests on release (elastic#118742)
Browse files Browse the repository at this point in the history
Fix elastic#118721

* Skip corresponding optimizer tests if `LOOKUP JOIN` is disabled.
* Enable LogicalPlanOptimizerTests again.
  • Loading branch information
alex-spies authored Dec 16, 2024
1 parent 21c238b commit bb8503a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 0 additions & 2 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ tests:
- class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests
method: testInvalidJSON
issue: https://github.com/elastic/elasticsearch/issues/116521
- class: org.elasticsearch.xpack.esql.optimizer.LogicalPlanOptimizerTests
issue: https://github.com/elastic/elasticsearch/issues/118721

# Examples:
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.elasticsearch.xpack.esql.EsqlTestUtils;
import org.elasticsearch.xpack.esql.TestBlockFactory;
import org.elasticsearch.xpack.esql.VerificationException;
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
import org.elasticsearch.xpack.esql.analysis.Analyzer;
import org.elasticsearch.xpack.esql.analysis.AnalyzerContext;
import org.elasticsearch.xpack.esql.analysis.AnalyzerTestUtils;
Expand Down Expand Up @@ -4910,6 +4911,8 @@ public void testPlanSanityCheck() throws Exception {
}

public void testPlanSanityCheckWithBinaryPlans() throws Exception {
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());

var plan = optimizedPlan("""
FROM test
| RENAME languages AS language_code
Expand Down Expand Up @@ -5913,6 +5916,8 @@ public void testLookupStats() {
* \_EsRelation[language_code][LOOKUP][language_code{f}#18, language_name{f}#19]
*/
public void testLookupJoinPushDownFilterOnJoinKeyWithRename() {
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());

String query = """
FROM test
| RENAME languages AS language_code
Expand Down Expand Up @@ -5954,6 +5959,8 @@ public void testLookupJoinPushDownFilterOnJoinKeyWithRename() {
* \_EsRelation[language_code][LOOKUP][language_code{f}#18, language_name{f}#19]
*/
public void testLookupJoinPushDownFilterOnLeftSideField() {
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());

String query = """
FROM test
| RENAME languages AS language_code
Expand Down Expand Up @@ -5996,6 +6003,8 @@ public void testLookupJoinPushDownFilterOnLeftSideField() {
* \_EsRelation[language_code][LOOKUP][language_code{f}#18, language_name{f}#19]
*/
public void testLookupJoinPushDownDisabledForLookupField() {
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());

String query = """
FROM test
| RENAME languages AS language_code
Expand Down Expand Up @@ -6039,6 +6048,8 @@ public void testLookupJoinPushDownDisabledForLookupField() {
* \_EsRelation[language_code][LOOKUP][language_code{f}#19, language_name{f}#20]
*/
public void testLookupJoinPushDownSeparatedForConjunctionBetweenLeftAndRightField() {
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());

String query = """
FROM test
| RENAME languages AS language_code
Expand Down Expand Up @@ -6090,6 +6101,8 @@ public void testLookupJoinPushDownSeparatedForConjunctionBetweenLeftAndRightFiel
* \_EsRelation[language_code][LOOKUP][language_code{f}#19, language_name{f}#20]
*/
public void testLookupJoinPushDownDisabledForDisjunctionBetweenLeftAndRightField() {
assumeTrue("Requires LOOKUP JOIN", EsqlCapabilities.Cap.JOIN_LOOKUP_V5.isEnabled());

String query = """
FROM test
| RENAME languages AS language_code
Expand Down

0 comments on commit bb8503a

Please sign in to comment.