Skip to content

Commit f49e3c4

Browse files
EQL: fix JOIN command validation (not supported) (#122011) (#122169)
1 parent 7dce356 commit f49e3c4

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

docs/changelog/122011.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122011
2+
summary: Fix JOIN command validation (not supported)
3+
area: EQL
4+
type: bug
5+
issues: []

x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/analysis/Verifier.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ Collection<Failure> verify(LogicalPlan plan) {
7171

7272
// start bottom-up
7373
plan.forEachUp(p -> {
74+
if (p.getClass().equals(Join.class)) {
75+
failures.add(fail(p, "JOIN command is not supported"));
76+
}
7477
if (p.analyzed()) {
7578
return;
7679
}

x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/analysis/VerifierTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,13 @@ public void testJoin() {
368368
accept(idxr, "foo where serial_event_id == 0");
369369
}
370370

371+
public void testJoinCommand() {
372+
final IndexResolution idxr = loadIndexResolution("mapping-ip.json");
373+
374+
assertEquals("1:1: JOIN command is not supported", error(idxr, "join [any where true] [any where true]"));
375+
assertEquals("1:1: JOIN command is not supported", error(idxr, "join [any where true] [any where true] | tail 3"));
376+
}
377+
371378
public void testMultiField() {
372379
final IndexResolution idxr = loadIndexResolution("mapping-multi-field.json");
373380
accept(idxr, "foo where multi_field.raw == \"bar\"");

0 commit comments

Comments
 (0)