Eventual-Inc / Daft

Distributed DataFrame for Python designed for the cloud, powered by Rust
https://getdaft.io
Apache License 2.0
1.85k stars 113 forks source link

Optimizer: simplify expression optimizer rule #2422

Open universalmind303 opened 1 week ago

universalmind303 commented 1 week ago

Is your feature request related to a problem? Please describe. Most other rule based execution engines have some form of expression simplification.

Some common optimizations

Additional context other rust based examples

universalmind303 commented 1 week ago

it seems like some of these expression simplifications happen in other optimizers

One example is combining conditional logic for filters as tested here

https://github.com/universalmind303/Daft/blob/158291c66e03be9b2252a428f826b6e78c2fb30a/src/daft-plan/src/logical_optimization/rules/push_down_filter.rs#L351

samster25 commented 4 days ago

Good call out!