Eventual-Inc / Daft

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

[PERF] Evaluate only true/false side of if_else if predicate is boolean #2222

Closed colin-ho closed 2 weeks ago

colin-ho commented 2 weeks ago

Closes #2190

If the predicate for an if_else statement is a boolean, i.e true/false, we only need to evaluate one side of the expression.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@99a0ac0). Click here to learn what that means. Report is 1 commits behind head on main.

:exclamation: Current head fda4a2e differs from pull request most recent head 0313410. Consider uploading reports for the commit 0313410 to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2222/graphs/tree.svg?width=650&height=150&src=pr&token=J430QVFE89&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc)](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2222?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc) ```diff @@ Coverage Diff @@ ## main #2222 +/- ## ======================================= Coverage ? 85.59% ======================================= Files ? 71 Lines ? 7586 Branches ? 0 ======================================= Hits ? 6493 Misses ? 1093 Partials ? 0 ```