-
Notifications
You must be signed in to change notification settings - Fork 234
fix: implement lazy evaluation in Coalesce function #2270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: implement lazy evaluation in Coalesce function #2270
Conversation
@andygrove , Please kick off the CI whenever you get a chance |
cd2c3cb
to
f0055e3
Compare
Rebased with main branch . |
f0055e3
to
e0cdb86
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2270 +/- ##
============================================
+ Coverage 56.12% 57.86% +1.73%
- Complexity 976 1291 +315
============================================
Files 119 146 +27
Lines 11743 13403 +1660
Branches 2251 2378 +127
============================================
+ Hits 6591 7755 +1164
- Misses 4012 4385 +373
- Partials 1140 1263 +123 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@andygrove please take a look whenever you get a chance . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @coderfender. This is looking good. I will review tomorrow.
Thank you very much @andygrove |
Which issue does this PR close?
Closes #2233
Rationale for this change
Spark performs lazy evaluation with the coalesce function while comet/ data fusion does not . This causes different behavior when one of the expressions errors out (ex: division by zero) .
What changes are included in this PR?
This change essentially converts spark's coalesce nodes into case statement node (to leverage current comet functionality) . This change is minimal and easy to revert once the upstream datafusion bug is fixed.
How are these changes tested?
Unit tests to ensure lazy evaluation is performed