apache / apache/datafusion

Produce optimal plans, remove `max_passes` config

Open
#11,286 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

`max_passes` (defaults to 3) defines how many times a given optimization rule can be applied to a plan tree.
This artificially limit optimization capabilities. Things like predicate push-down / propagation may require more runs on for more complex queries.

### Describe the solution you'd like

Remove `max_passes` config. The plan should be considered as optimied when no further optimization can be performed on it.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the implementation and uses of the `max_passes` optimizer configuration, then trace how optimization completion is currently determined. Confirm the behavior for predicate push-down and propagation on complex plans, and consider how tests can demonstrate that optimization continues until no further changes are possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.