Skip to content

Commit 9e4be57

Browse files
committed
More fixes
1 parent ae7a7ce commit 9e4be57

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterEnrichIT.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ public void testAggThenEnrichRemote() {
405405
| sort vendor
406406
""", enrichHosts(Enrich.Mode.ANY), enrichVendors(Enrich.Mode.REMOTE));
407407
var error = expectThrows(VerificationException.class, () -> runQuery(query, randomBoolean()).close());
408-
assertThat(error.getMessage(), containsString("ENRICH with remote policy can't be executed after STATS"));
408+
assertThat(error.getMessage(), containsString("ENRICH with remote policy can't be executed after [stats c = COUNT(*) by os]@4:3"));
409409
}
410410

411411
public void testEnrichCoordinatorThenEnrichRemote() {
@@ -417,10 +417,7 @@ public void testEnrichCoordinatorThenEnrichRemote() {
417417
| sort vendor
418418
""", enrichHosts(Enrich.Mode.COORDINATOR), enrichVendors(Enrich.Mode.REMOTE));
419419
var error = expectThrows(VerificationException.class, () -> runQuery(query, randomBoolean()).close());
420-
assertThat(
421-
error.getMessage(),
422-
containsString("ENRICH with remote policy can't be executed after another ENRICH with coordinator policy")
423-
);
420+
assertThat(error.getMessage(), containsString("ENRICH with remote policy can't be executed after [ENRICH _COORDINATOR"));
424421
}
425422

426423
private static void assertCCSExecutionInfoDetails(EsqlExecutionInfo executionInfo) {

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/Enrich.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,26 +305,26 @@ public int hashCode() {
305305
* We might consider implementing the actual remote enrich on the coordinating cluster, however, this requires
306306
* retaining the originating cluster and restructing pages for routing, which might be complicated.
307307
*/
308-
private static void checkForPlansForbiddenBeforeRemoteEnrich(Enrich enrich, Failures failures) {
309-
if (enrich.mode != Mode.REMOTE) {
308+
private void checkForPlansForbiddenBeforeRemoteEnrich(Failures failures) {
309+
if (this.mode != Mode.REMOTE) {
310310
return;
311311
}
312312

313313
Set<Source> badCommands = new HashSet<>();
314314

315-
enrich.forEachUp(LogicalPlan.class, u -> {
315+
this.forEachUp(LogicalPlan.class, u -> {
316316
if (u instanceof ExecutesOn ex && ex.executesOn() == ExecuteLocation.COORDINATOR) {
317317
badCommands.add(u.source());
318318
}
319319
});
320320

321321
badCommands.forEach(
322-
f -> failures.add(fail(enrich, "ENRICH with remote policy can't be executed after [" + f.text() + "]" + f.source()))
322+
f -> failures.add(fail(this, "ENRICH with remote policy can't be executed after [" + f.text() + "]" + f.source()))
323323
);
324324
}
325325

326326
@Override
327327
public void postAnalysisVerification(Failures failures) {
328-
checkForPlansForbiddenBeforeRemoteEnrich(this, failures);
328+
checkForPlansForbiddenBeforeRemoteEnrich(failures);
329329
}
330330
}

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/join/LookupJoin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
package org.elasticsearch.xpack.esql.plan.logical.join;
99

10-
import org.elasticsearch.xpack.esql.capabilities.PostAnalysisVerificationAware;
1110
import org.elasticsearch.xpack.esql.capabilities.TelemetryAware;
1211
import org.elasticsearch.xpack.esql.common.Failures;
1312
import org.elasticsearch.xpack.esql.core.expression.Attribute;
@@ -31,7 +30,7 @@
3130
/**
3231
* Lookup join - specialized LEFT (OUTER) JOIN between the main left side and a lookup index (index_mode = lookup) on the right.
3332
*/
34-
public class LookupJoin extends Join implements SurrogateLogicalPlan, PostAnalysisVerificationAware, TelemetryAware {
33+
public class LookupJoin extends Join implements SurrogateLogicalPlan, TelemetryAware {
3534

3635
public LookupJoin(Source source, LogicalPlan left, LogicalPlan right, List<Attribute> joinFields, boolean isRemote) {
3736
this(source, left, right, new UsingJoinType(LEFT, joinFields), emptyList(), emptyList(), emptyList(), isRemote);

0 commit comments

Comments
 (0)