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 GO M TO N STEPS
which record the data in go traversal.
#2091
Support GO M TO N STEPS
which record the data in go traversal.
#2091
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2091 +/- ##
==========================================
+ Coverage 86.70% 86.81% +0.10%
==========================================
Files 641 641
Lines 61190 61523 +333
==========================================
+ Hits 53056 53411 +355
+ Misses 8134 8112 -22
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #2091 +/- ##
==========================================
+ Coverage 86.84% 86.88% +0.04%
==========================================
Files 641 641
Lines 61651 61983 +332
==========================================
+ Hits 53541 53856 +315
- Misses 8110 8127 +17
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about only save the data which we hope? now it may cost much memory.
return; | ||
} | ||
starts_ = std::move(status).value(); | ||
auto dsts = getDstIdsFromResps(records_.end() - 1, records_.end()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modify records_.end() - 1
to records_.rbegin()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's better clear.
return; | ||
} | ||
|
||
void GoExecutor::onVertexProps(RpcResponse &&rpcResp) { | ||
UNUSED(rpcResp); | ||
} | ||
|
||
StatusOr<std::vector<VertexID>> GoExecutor::getDstIdsFromResp(RpcResponse &rpcResp) const { | ||
std::vector<VertexID> GoExecutor::getDstIdsFromResps(std::vector<RpcResponse>::iterator begin, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about std::vector<VertexID> GoExecutor::getDstIdsFromResps(uint32_t beginPos)
the beginPos is the first element of recordFrom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think iterator is better.
It's to unify the process. Won't record the unused properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
…oft-inc#2091) * Support `GO M TO N STEPS` which record the data in go traversal. * Add the parser testing. * Put the variable to cross all loop. * Add test. * Comfirm the bidirectionally cases. * Add cases for over *. * Let the intermidiate response return the properies if specified.
…) (#2136) * Support `GO M TO N STEPS` which record the data in go traversal. * Add the parser testing. * Put the variable to cross all loop. * Add test. * Comfirm the bidirectionally cases. * Add cases for over *. * Let the intermidiate response return the properies if specified. Co-authored-by: Shylock Hg <33566796+Shylock-Hg@users.noreply.github.com>
doc done |
…oft-inc#2091) * Support `GO M TO N STEPS` which record the data in go traversal. * Add the parser testing. * Put the variable to cross all loop. * Add test. * Comfirm the bidirectionally cases. * Add cases for over *. * Let the intermidiate response return the properies if specified.
What changes were proposed in this pull request?
Support the grammar
GO [[<M> TO] <N> STEPS]
to collect the data in GO traversal.If can't reach N steps, return empty now.(Will be change in #2148
Why are the changes needed?
Does this PR introduce any user-facing change?
Yes, @Amber1990Zhang
How was this patch tested?
Checklist