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(frontend/expr): unifiy to_expr and as_expr, remove redundent code #1816

Merged
merged 10 commits into from
Apr 14, 2022

Conversation

Enter-tainer
Copy link
Contributor

@Enter-tainer Enter-tainer commented Apr 13, 2022

Condition::as_expr and Condition::to_expr are very similar, except for one is for borrowed value and the other one is for owned value. However, these two functions are implemented by copying and pasting code. This pr unifies the borrowed version and the owned version.

Checklist

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

@st1page st1page requested a review from BugenZhao April 13, 2022 09:08
@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #1816 (04b68c9) into main (76c22f6) will increase coverage by 0.01%.
The diff coverage is 84.21%.

@@            Coverage Diff             @@
##             main    #1816      +/-   ##
==========================================
+ Coverage   70.84%   70.85%   +0.01%     
==========================================
  Files         610      610              
  Lines       79689    79684       -5     
==========================================
+ Hits        56453    56462       +9     
+ Misses      23236    23222      -14     
Flag Coverage Δ
rust 70.85% <84.21%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...c/frontend/src/optimizer/plan_node/batch_filter.rs 81.81% <0.00%> (ø)
src/frontend/src/utils/condition.rs 96.24% <0.00%> (+6.53%) ⬆️
src/frontend/src/expr/utils.rs 98.71% <72.72%> (-0.96%) ⬇️
src/frontend/src/expr/mod.rs 91.27% <100.00%> (+0.90%) ⬆️
...frontend/src/optimizer/plan_node/logical_filter.rs 97.79% <100.00%> (ø)
...c/frontend/src/optimizer/plan_node/logical_join.rs 84.99% <100.00%> (+0.08%) ⬆️
.../frontend/src/optimizer/plan_node/stream_filter.rs 87.87% <100.00%> (ø)

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

src/frontend/src/utils/condition.rs Outdated Show resolved Hide resolved
src/frontend/src/utils/condition.rs Outdated Show resolved Hide resolved
src/frontend/src/utils/condition.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@st1page st1page left a comment

Choose a reason for hiding this comment

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

LGTM

@Enter-tainer Enter-tainer enabled auto-merge (squash) April 14, 2022 12:07
@Enter-tainer Enter-tainer merged commit 1b43f99 into main Apr 14, 2022
@Enter-tainer Enter-tainer deleted the lwz/expr-chores branch April 14, 2022 12:36
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.

None yet

4 participants