Skip to content

Commit 627ea94

Browse files
committed
Simplify
1 parent 75f0210 commit 627ea94

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,13 @@ public PlanFactory visitEnrichCommand(EsqlBaseParser.EnrichCommandContext ctx) {
484484
List<NamedExpression> keepClauses = visitList(this, ctx.enrichWithClause(), NamedExpression.class);
485485

486486
// If this is a remote-only ENRICH, any upstream LOOKUP JOINs need to be treated as remote-only, too.
487-
LogicalPlan updatedChild = (mode == Mode.REMOTE)
488-
? child.transformDown(LookupJoin.class, lj -> new LookupJoin(lj.source(), lj.left(), lj.right(), lj.config(), true))
489-
: child;
487+
if (mode == Mode.REMOTE) {
488+
child = child.transformDown(LookupJoin.class, lj -> new LookupJoin(lj.source(), lj.left(), lj.right(), lj.config(), true));
489+
}
490490

491491
return new Enrich(
492492
source,
493-
updatedChild,
493+
child,
494494
mode,
495495
Literal.keyword(source(ctx.policyName), policyNameString),
496496
matchField,

0 commit comments

Comments
 (0)