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(optimizer): LogicalProject::with_mapping should return Self #2566

Merged
merged 3 commits into from
May 16, 2022

Conversation

Enter-tainer
Copy link
Contributor

What's changed and what's your intention?

As the title, make LogicalProject::with_mapping return Self rather than PlanRef, allowing better code reuse.

The logic for empty projection is changed as well. We should return an empty projection rather than directly return input.

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)

@codecov
Copy link

codecov bot commented May 16, 2022

Codecov Report

Merging #2566 (ba66596) into main (10cce2e) will increase coverage by 0.00%.
The diff coverage is 88.88%.

@@           Coverage Diff           @@
##             main    #2566   +/-   ##
=======================================
  Coverage   72.08%   72.08%           
=======================================
  Files         677      677           
  Lines       88006    88011    +5     
=======================================
+ Hits        63439    63444    +5     
  Misses      24567    24567           
Flag Coverage Δ
rust 72.08% <88.88%> (+<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/logical_topn.rs 85.24% <0.00%> (-0.71%) ⬇️
...rc/frontend/src/optimizer/plan_node/logical_agg.rs 97.65% <100.00%> (+<0.01%) ⬆️
...frontend/src/optimizer/plan_node/logical_filter.rs 97.89% <100.00%> (+0.01%) ⬆️
...tend/src/optimizer/plan_node/logical_hop_window.rs 99.36% <100.00%> (+<0.01%) ⬆️
...c/frontend/src/optimizer/plan_node/logical_join.rs 87.51% <100.00%> (+0.01%) ⬆️
...rontend/src/optimizer/plan_node/logical_project.rs 98.77% <100.00%> (ø)
...frontend/src/optimizer/plan_node/logical_source.rs 64.40% <100.00%> (ø)
src/connector/src/filesystem/file_common.rs 80.35% <0.00%> (-0.45%) ⬇️
src/common/src/types/ordered_float.rs 24.90% <0.00%> (+0.19%) ⬆️
src/meta/src/model/barrier.rs 82.14% <0.00%> (+3.57%) ⬆️

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

@Enter-tainer Enter-tainer enabled auto-merge (squash) May 16, 2022 08:09
@Enter-tainer Enter-tainer merged commit 8798556 into main May 16, 2022
@Enter-tainer Enter-tainer deleted the lwz/with-empty-mapping branch May 16, 2022 08:31
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.

2 participants