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

Bidirectional traverse. #1740

Merged
merged 9 commits into from
Feb 28, 2020
Merged

Conversation

CPWstatic
Copy link
Contributor

@CPWstatic CPWstatic commented Feb 7, 2020

Close #1570 #1600 #1609 #1358

I will close #1694, if this is an accepted solution.

src/parser/Clauses.h Outdated Show resolved Hide resolved
src/graph/GoExecutor.cpp Outdated Show resolved Hide resolved
src/graph/GoExecutor.cpp Outdated Show resolved Hide resolved
@@ -442,10 +453,13 @@ void GoExecutor::stepOut() {
}
auto returns = status.value();
std::string filterPushdown = "";
if (FLAGS_filter_pushdown && isFinalStep() && !isReversely()) {
if (FLAGS_filter_pushdown && isFinalStep()
&& direction_ == OverClause::Direction::kForward) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently, filter could be pushed down for all directions traversal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a new pr #1785 to do this, based on this pr.

src/graph/GoExecutor.cpp Outdated Show resolved Hide resolved
src/graph/GoExecutor.cpp Show resolved Hide resolved
src/graph/GoExecutor.cpp Outdated Show resolved Hide resolved
src/graph/GoExecutor.cpp Outdated Show resolved Hide resolved
src/storage/query/QueryBaseProcessor.inl Outdated Show resolved Hide resolved
@CPWstatic CPWstatic force-pushed the go_bidirectional branch 2 times, most recently from 2153cfa to c23a655 Compare February 20, 2020 06:14
src/dataman/RowReader.h Show resolved Hide resolved
return 0L;
}
}
return isReversely() ? srcId : dstId;
return dstId;
Copy link
Contributor

Choose a reason for hiding this comment

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

@whitewum Please note the changes here.

Copy link
Contributor

@whitewum whitewum Feb 24, 2020

Choose a reason for hiding this comment

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

can anybody tell me:

E.g.1
,

Match (n)-[xx]->(m)
Return id(m)

is

GO FROM n OVER xx YIELD xx._dst

E.g.2

Match (m)<-[xx]-(n)
Return id(n)

is it

GO FROM m REVERSELY OVER xx YIELD xx._dst or xx._src

E.g.3

Match (n)-[xx]-(m)
Return id(m)

is it

GO FROM n BIDIRECT OVER xx YIELD xx._dst

I'm confused several times, and can't get it anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

e.g.2
GO FROM m REVERSELY OVER xx YIELD xx._dst

e.g.3
GO FROM n BIDIRECT OVER xx YIELD xx._dst

You can think the "_src" represents myself, "_dst" means the other point.

src/graph/GoExecutor.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@dangleptr dangleptr left a comment

Choose a reason for hiding this comment

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

Well done. LGTM now.

Copy link
Contributor

@laura-ding laura-ding left a comment

Choose a reason for hiding this comment

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

Well done

@dangleptr dangleptr merged commit ecdad58 into vesoft-inc:master Feb 28, 2020
jude-zhu pushed a commit to jude-zhu/nebula that referenced this pull request Mar 4, 2020
* Support bidirectional traverse.

* Add basic bidirectional traverse test.

* Fix ut.

* Add ut for multi edge traverse.

* Fix clang compile error.

* Address comment.

* Adddress @dangleptr's comment.

* Address comment.

Co-authored-by: laura-ding <[email protected]>
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
* Support bidirectional traverse.

* Add basic bidirectional traverse test.

* Fix ut.

* Add ut for multi edge traverse.

* Fix clang compile error.

* Address comment.

* Adddress @dangleptr's comment.

* Address comment.

Co-authored-by: laura-ding <[email protected]>
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.

'go' graph traversal supports both direction
7 participants