Skip to content

Commit 8413dbc

Browse files
committed
One more test case
1 parent e67924c commit 8413dbc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,22 @@ public void testRemoteEnrichAfterCoordinatorOnlyPlans() {
101101
| STATS count(*) BY language_name
102102
""", analyzer);
103103

104+
plan("""
105+
FROM test
106+
| LIMIT 10
107+
| EVAL language_code = languages
108+
| ENRICH _remote:languages ON language_code
109+
| STATS count(*) BY language_name
110+
""", analyzer);
111+
112+
plan("""
113+
FROM test
114+
| EVAL language_code = languages
115+
| ENRICH _remote:languages ON language_code
116+
| STATS count(*) BY language_name
117+
| LIMIT 10
118+
""", analyzer);
119+
104120
err = error("""
105121
FROM test
106122
| EVAL language_code = languages
@@ -130,6 +146,7 @@ public void testRemoteEnrichAfterCoordinatorOnlyPlans() {
130146
""", analyzer);
131147
assertThat(err, containsString("6:3: ENRICH with remote policy can't be executed after [STATS count(*) BY language_code]@3:3"));
132148

149+
// Coordinator after remote is OK
133150
plan("""
134151
FROM test
135152
| EVAL language_code = languages
@@ -302,6 +319,11 @@ public void testRemoteLookupJoinWithPipelineBreaker() {
302319
)
303320
);
304321

322+
plan(
323+
"FROM test,remote:test | EVAL language_code = languages | LOOKUP JOIN languages_lookup ON language_code | LIMIT 2",
324+
analyzer
325+
);
326+
305327
// Since FORK, RERANK, COMPLETION and CHANGE_POINT are not supported on remote indices, we can't check them here against the remote
306328
// LOOKUP JOIN
307329
}

0 commit comments

Comments
 (0)