Skip to content

ESQL: PruneColumns should also prune unused attributes from Projects #140757

@alex-spies

Description

@alex-spies

See https://github.com/elastic/elasticsearch/pull/137923/files#r2658372536

PruneColumns outright skips Projects for no good reason (that I can think of), and it can leave more attributes in the plan than would sometimes be necessary.

This affects queries where a Project cannot be pulled up to the top of the plan. In most cases, we never notice the missing pruning in Projects because columns are effectively pruned from Projects when Projects are moved up to the topmost Project (or Stats) and combined with it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions