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

Enhancement/prune properties root node #4212

Merged

Conversation

Shylock-Hg
Copy link
Contributor

@Shylock-Hg Shylock-Hg commented Apr 27, 2022

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Close #4156

Description:

Previous prune properties require the root node to be Project, this PR fix it and let it could be others.

How do you solve it?

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • N/A

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

ex. Fixed the bug .....

@Shylock-Hg Shylock-Hg added the ready-for-testing PR: ready for the CI test label Apr 27, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #4212 (67a5646) into master (4026d75) will increase coverage by 0.04%.
The diff coverage is 58.53%.

@@            Coverage Diff             @@
##           master    #4212      +/-   ##
==========================================
+ Coverage   84.89%   84.93%   +0.04%     
==========================================
  Files        1326     1326              
  Lines      131683   131745      +62     
==========================================
+ Hits       111793   111899     +106     
+ Misses      19890    19846      -44     
Impacted Files Coverage Δ
src/graph/planner/plan/Algo.cpp 43.75% <0.00%> (ø)
src/graph/planner/plan/Mutate.cpp 0.00% <0.00%> (ø)
src/graph/util/ToJson.h 100.00% <ø> (ø)
src/graph/visitor/PrunePropertiesVisitor.h 50.00% <ø> (-50.00%) ⬇️
src/graph/util/ToJson.cpp 50.26% <58.06%> (-2.29%) ⬇️
src/graph/planner/plan/Admin.cpp 50.39% <62.50%> (ø)
src/graph/visitor/PrunePropertiesVisitor.cpp 87.60% <65.00%> (-7.11%) ⬇️
src/graph/planner/plan/Maintain.cpp 41.50% <66.66%> (ø)
src/graph/planner/plan/Query.cpp 67.97% <88.88%> (ø)
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c56e302...67a5646. Read the comment docs.

void PrunePropertiesVisitor::visitCurrent(Project *node) {
// TODO won't use properties of not-root Project
// bool used = used_;
used_ = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

When would used_ be true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In first plan node (root node)

Copy link
Contributor

@jievince jievince left a comment

Choose a reason for hiding this comment

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

LGTM

@yixinglu yixinglu merged commit 326b856 into vesoft-inc:master Apr 28, 2022
@Shylock-Hg Shylock-Hg deleted the enhancement/prune-properties-root-node branch April 29, 2022 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prune properties shouldn't require analysis from Project.
5 participants