Skip to content

ESQL: LOOKUP JOIN push down optimizations #119082

Closed
@alex-spies

Description

@alex-spies

Compared to ENRICH (and other, similar plans like GROK, DISSECT and EVAL), we do not push down LOOKUP JOINs.

That leads to suboptimal plans, e.g. because projections before and after the LOOKUP JOIN cannot be combined.

Example:

              FROM test
            | LOOKUP JOIN lookup_index1 ON field
            | RENAME foo AS b
            | LOOKUP JOIN lookup_index2 ON field
            | DROP b*

The RENAME foo AS b in between the LOOKUP JOINs becomes an EsqlProject, which cannot be combined with the EsqlProject that comes from the DROP b* because the LOOKUP JOIN lookup_index_2 is in the way. As a result, we cannot determine that the field foo obtained from the lookup_index1 is actually dropped and unused in the end.

Edit: Let's also double check that there are no other existing optimizer rules that could (somewhat) easily be applied to LOOKUP JOIN.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions