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

Support filter in scan. #3329

Merged
merged 15 commits into from
Nov 25, 2021

Conversation

Shylock-Hg
Copy link
Contributor

@Shylock-Hg Shylock-Hg commented Nov 18, 2021

What type of PR is this?

  • bug
  • feature
  • enhancement

What does this PR do?

Support push-down filter of scan interface.

Which issue(s)/PR(s) this PR relates to?

Sub job of #3320

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

Additional context:

Checklist:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatible (If it is incompatible, please describe it and add corresponding label.)
  • Need to cherry-pick (If need to cherry-pick to some branches, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to reflect in release notes and how to describe:

                                                            `

@Shylock-Hg Shylock-Hg added the ready-for-testing PR: ready for the CI test label Nov 18, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2021

Codecov Report

Merging #3329 (222ad74) into master (6541438) will decrease coverage by 0.01%.
The diff coverage is 86.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3329      +/-   ##
==========================================
- Coverage   85.31%   85.30%   -0.02%     
==========================================
  Files        1289     1289              
  Lines      120073   120197     +124     
==========================================
+ Hits       102442   102535      +93     
- Misses      17631    17662      +31     
Impacted Files Coverage Δ
src/storage/context/StorageExpressionContext.h 73.91% <ø> (ø)
src/storage/query/QueryBaseProcessor.h 100.00% <ø> (ø)
src/storage/query/ScanEdgeProcessor.h 100.00% <ø> (ø)
src/storage/query/ScanVertexProcessor.h 100.00% <ø> (ø)
src/storage/query/ScanVertexProcessor.cpp 54.46% <41.17%> (+1.13%) ⬆️
src/graph/visitor/RewriteVisitor.cpp 76.37% <50.00%> (ø)
src/storage/test/UpdateEdgeTest.cpp 99.18% <50.00%> (-0.07%) ⬇️
src/storage/query/ScanEdgeProcessor.cpp 54.05% <58.33%> (+1.16%) ⬆️
src/storage/exec/ScanNode.h 90.58% <87.17%> (+0.37%) ⬆️
src/graph/validator/GroupByValidator.cpp 95.28% <100.00%> (ø)
... and 33 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 b7c6901...222ad74. Read the comment docs.

cangfengzhs
cangfengzhs previously approved these changes Nov 19, 2021
Copy link
Contributor

@cangfengzhs cangfengzhs left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -64,6 +64,13 @@ nebula::cpp2::ErrorCode ScanEdgeProcessor::checkAndBuildContexts(const cpp2::Sca
std::vector<cpp2::EdgeProp> returnProps = {*req.return_columns_ref()};
ret = handleEdgeProps(returnProps);
buildEdgeColName(returnProps);
ret = buildFilter(req, [](const cpp2::ScanEdgeRequest& r) -> const std::string* {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about just override the buildFilter? Passing another function here is a little weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The override code is almost same, so I don't do it as this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Em... Actually the lambda is almost same as well. Not so important.

src/storage/exec/ScanNode.h Show resolved Hide resolved
Copy link
Contributor

@cangfengzhs cangfengzhs left a comment

Choose a reason for hiding this comment

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

LGTM

@CPWstatic CPWstatic merged commit 6a8a5f7 into vesoft-inc:master Nov 25, 2021
@Shylock-Hg Shylock-Hg deleted the feature/scan-with-filter branch February 9, 2022 07:15
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.

None yet

7 participants