-
Notifications
You must be signed in to change notification settings - Fork 572
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
feat: implement nullif and coalesce function #2308
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2308 +/- ##
==========================================
+ Coverage 71.02% 71.05% +0.03%
==========================================
Files 676 677 +1
Lines 84568 84696 +128
==========================================
+ Hits 60064 60181 +117
- Misses 24504 24515 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
708c4d0
to
030670e
Compare
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.
lgtm
@@ -80,6 +88,44 @@ impl Binder { | |||
} | |||
} | |||
|
|||
/// Make sure inputs only have 2 value and rewrite the arguments. | |||
/// Nullif(expr1,expr2) -> Case(Equal(expr1 = expr2),null,expr1). | |||
fn write_nullif_to_case_args(inputs: Vec<ExprImpl>) -> Result<Vec<ExprImpl>> { |
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.
fn write_nullif_to_case_args(inputs: Vec<ExprImpl>) -> Result<Vec<ExprImpl>> { | |
fn rewrite_nullif_to_case_when(inputs: Vec<ExprImpl>) -> Result<Vec<ExprImpl>> { |
What's changed and what's your intention?
PLEASE DO NOT LEAVE THIS EMPTY !!!
Checklist
Refer to a related PR or issue link (optional)
#2283
#2284