-
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 4 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,5 @@ | ||
| pr: 131286 | ||
| summary: Allow remote enrich after LOOKUP JOIN | ||
| area: ES|QL | ||
| type: bug | ||
| issues: [] | ||
| 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 |
|---|---|---|
|
|
@@ -463,7 +463,7 @@ public LogicalPlan visitShowInfo(EsqlBaseParser.ShowInfoContext ctx) { | |
|
|
||
| @Override | ||
| public PlanFactory visitEnrichCommand(EsqlBaseParser.EnrichCommandContext ctx) { | ||
| return p -> { | ||
| return child -> { | ||
| var source = source(ctx); | ||
| Tuple<Mode, String> tuple = parsePolicyName(ctx.policyName); | ||
| Mode mode = tuple.v1(); | ||
|
|
@@ -482,9 +482,15 @@ public PlanFactory visitEnrichCommand(EsqlBaseParser.EnrichCommandContext ctx) { | |
| } | ||
|
|
||
| List<NamedExpression> keepClauses = visitList(this, ctx.enrichWithClause(), NamedExpression.class); | ||
|
|
||
| // If this is a remote-only ENRICH, any upstream LOOKUP JOINs need to be treated as remote-only, too. | ||
| LogicalPlan updatedChild = (mode == Mode.REMOTE) == false | ||
|
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. 👍 |
||
| ? child | ||
| : child.transformDown(LookupJoin.class, lj -> new LookupJoin(lj.source(), lj.left(), lj.right(), lj.config(), true)); | ||
|
|
||
| return new Enrich( | ||
| source, | ||
| p, | ||
| updatedChild, | ||
| mode, | ||
| Literal.keyword(source(ctx.policyName), policyNameString), | ||
| matchField, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.