Skip to content
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

refactor(binder): use align_types for coalesce #2382

Merged
merged 2 commits into from
May 9, 2022

Conversation

xiangjinwu
Copy link
Contributor

What's changed and what's your intention?

align_types allows a list of exprs that implicitly castable to the same type.

dev=> select coalesce(1, 1.2);
 expr#0 
--------
 1
(1 row)

dev=> select coalesce(date '2020-01-01', timestamp '2020-01-01 01:02:03');
       expr#0        
---------------------
 2020-01-01 00:00:00
(1 row)

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

#2308

@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #2382 (ebbc3d9) into main (27fc53b) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2382      +/-   ##
==========================================
- Coverage   71.24%   71.24%   -0.01%     
==========================================
  Files         680      680              
  Lines       86111    86097      -14     
==========================================
- Hits        61353    61339      -14     
  Misses      24758    24758              
Flag Coverage Δ
rust 71.24% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/binder/expr/function.rs 91.07% <100.00%> (-1.36%) ⬇️
src/frontend/src/expr/function_call.rs 99.29% <100.00%> (+0.03%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@xiangjinwu xiangjinwu marked this pull request as ready for review May 9, 2022 07:26
@xiangjinwu xiangjinwu requested a review from cykbls01 May 9, 2022 07:27
Copy link
Contributor

@neverchanje neverchanje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm @cykbls01 Please take a look.

@xiangjinwu xiangjinwu force-pushed the rust-frontend-align-types-coalesce branch from 0b4ec2e to ebbc3d9 Compare May 9, 2022 10:40
@xiangjinwu xiangjinwu enabled auto-merge (squash) May 9, 2022 10:41
@xiangjinwu xiangjinwu merged commit 35968ed into main May 9, 2022
@xiangjinwu xiangjinwu deleted the rust-frontend-align-types-coalesce branch May 9, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants