Skip to content

Commit 6703882

Browse files
add test
1 parent 937963b commit 6703882

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,6 +2480,15 @@ public void testMultiMatchTargetsExistingField() throws Exception {
24802480
);
24812481
}
24822482

2483+
public void testMultiMatchInsideEval() throws Exception {
2484+
assumeTrue("MultiMatch operator is available just for snapshots", Build.current().isSnapshot());
2485+
assertEquals(
2486+
"1:36: [MultiMatch] function is only supported in WHERE commands\n"
2487+
+ "line 1:55: [MultiMatch] function cannot operate on [title], which is not a field from an index mapping",
2488+
error("row title = \"brown fox\" | eval x = multi_match(\"fox\", title)")
2489+
);
2490+
}
2491+
24832492
public void testInsistNotOnTopOfFrom() {
24842493
assumeTrue("requires snapshot builds", Build.current().isSnapshot());
24852494

0 commit comments

Comments
 (0)