-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: Allow remote enrich after LOOKUP JOIN #131286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
5c6b3f4
3aaf1b4
4efe247
0f65dd5
6d52153
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| pr: 131286 | ||
| summary: Allow remote enrich after LOOKUP JOIN | ||
| area: ES|QL | ||
| type: bug | ||
| issues: | ||
| - 129372 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,7 +117,7 @@ public void testEnrichAfterStop() throws Exception { | |
| SimplePauseFieldPlugin.allowEmitting.countDown(); | ||
|
|
||
| try (EsqlQueryResponse resp = stopAction.actionGet(30, TimeUnit.SECONDS)) { | ||
| // Compare this to CrossClustersEnrichIT.testEnrichTwiceThenAggs - the results from c2 will be absent | ||
| // Compare this to CrossClusterEnrichIT.testEnrichTwiceThenAggs - the results from c2 will be absent | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh. There's one more in CrossClusterEnrichUnavailableClustersIT btw if we already fixing it :) |
||
| // because we stopped it before processing the data | ||
| assertThat( | ||
| getValuesList(resp), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ | |
| import org.elasticsearch.xpack.esql.plan.logical.join.Join; | ||
| import org.elasticsearch.xpack.esql.plan.logical.join.JoinConfig; | ||
| import org.elasticsearch.xpack.esql.plan.logical.join.JoinTypes; | ||
| import org.elasticsearch.xpack.esql.plan.physical.BinaryExec; | ||
| import org.elasticsearch.xpack.esql.plan.physical.EnrichExec; | ||
| import org.elasticsearch.xpack.esql.plan.physical.ExchangeExec; | ||
| import org.elasticsearch.xpack.esql.plan.physical.FragmentExec; | ||
|
|
@@ -102,7 +103,13 @@ private PhysicalPlan mapUnary(UnaryPlan unary) { | |
| // 5. So we should be keeping: LimitExec, ExchangeExec, OrderExec, TopNExec (actually OrderExec probably can't happen anyway). | ||
| Holder<Boolean> hasFragment = new Holder<>(false); | ||
|
|
||
| // Remove most plan nodes between this remote ENRICH and the data node's fragment so they're not executed twice; | ||
| // include the plan up until this ENRICH in the fragment. | ||
| var childTransformed = mappedChild.transformUp(f -> { | ||
| if (f instanceof BinaryExec be) { | ||
| // Remove any LOOKUP JOIN or inline Join from INLINE STATS do avoid double execution | ||
| return be.left(); | ||
| } | ||
|
||
| // Once we reached FragmentExec, we stuff our Enrich under it | ||
| if (f instanceof FragmentExec) { | ||
| hasFragment.set(true); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.