Support Const Propagation for Variables
- 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? Please describe what you are trying to do.**
Currently the SimplifyRule creates its own `ExecutionProps` from the `OptimizerConfig`, rather than this being propogated through correctly. The resulting `ExecutionProps` therefore lacks any `VarProvider` and so const propagation is not possible for variables.
**Describe the solution you'd like**
These variables should be available at optimization time, much like `query_execution_start_time`, to allow for const propagation to work correctly.
**Describe alternatives you've considered**
**Additional context**
#4629 tracks making `ExecutionProps` a trait
#2666 moved `OptimizerRule` away from using `ExecutionProps` in favor of a `OptimizerConfig`
Contributor guide
Research direction
Start by tracing SimplifyRule's creation of ExecutionProps from OptimizerConfig and review how OptimizerRule now receives configuration, along with issues #4629 and #2666. Determine how VarProvider should be available during optimization; done means variables are available at optimization time and const propagation works correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100