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

fix all path bug #2773

Merged
merged 2 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/graph/executor/algo/ConjunctPathExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,6 @@ bool ConjunctPathExecutor::findAllPaths(Iterator* backwardPathsIter,
Row row;
auto forward = i.getPath();
Path backward = path.getPath();
if (forward.src == backward.src) {
continue;
}
VLOG(1) << "Forward path:" << forward;
VLOG(1) << "Backward path:" << backward;
backward.reverse();
Expand Down
16 changes: 16 additions & 0 deletions tests/tck/features/path/AllPath.IntVid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ Feature: Integer Vid All Path
Given a graph with space named "nba_int_vid"

Scenario: Integer Vid [1] ALL Path
When executing query:
"""
FIND ALL PATH FROM hash("Tim Duncan") TO hash("Tim Duncan") OVER * UPTO 2 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
| <("Tim Duncan")-[:like]->("Tony Parker")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Tony Parker")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:like]->("Tony Parker")-[:teammate]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Tony Parker")-[:teammate]->("Tim Duncan")> |
| <("Tim Duncan")-[:like]->("Manu Ginobili")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Manu Ginobili")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:like]->("Manu Ginobili")-[:teammate]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Manu Ginobili")-[:teammate]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Danny Green")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("LaMarcus Aldridge")-[:like]->("Tim Duncan")> |
When executing query:
"""
FIND ALL PATH FROM hash("Tim Duncan") TO hash("Tony Parker") OVER like UPTO 3 STEPS
Expand Down
16 changes: 16 additions & 0 deletions tests/tck/features/path/AllPath.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ Feature: All Path
Given a graph with space named "nba"

Scenario: [1] ALL Path
When executing query:
"""
FIND ALL PATH FROM "Tim Duncan" TO "Tim Duncan" OVER * UPTO 2 STEPS
"""
Then the result should be, in any order, with relax comparison:
| path |
| <("Tim Duncan")-[:like]->("Tony Parker")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Tony Parker")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:like]->("Tony Parker")-[:teammate]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Tony Parker")-[:teammate]->("Tim Duncan")> |
| <("Tim Duncan")-[:like]->("Manu Ginobili")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Manu Ginobili")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:like]->("Manu Ginobili")-[:teammate]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Manu Ginobili")-[:teammate]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("Danny Green")-[:like]->("Tim Duncan")> |
| <("Tim Duncan")-[:teammate]->("LaMarcus Aldridge")-[:like]->("Tim Duncan")> |
When executing query:
"""
FIND ALL PATH FROM "Tim Duncan" TO "Tony Parker" OVER like UPTO 3 STEPS
Expand Down