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 allpath without prop when one step #5759

Merged
merged 4 commits into from
Dec 21, 2023
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
4 changes: 2 additions & 2 deletions src/graph/executor/algo/AllPathsExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ void AllPathsExecutor::buildOneWayPath(std::vector<NPath*>& paths, bool reverse)
auto iter = emptyPropVertices_.find(emptyPropVertex);
if (iter == emptyPropVertices_.end()) {
emptyPropVids_.emplace_back(dst);
emptyPropVertices_.emplace(emptyPropVertex);
}
emptyPropVertices_.emplace(emptyPropVertex);
result_.rows.emplace_back(std::move(row));
}
}
Expand Down Expand Up @@ -506,8 +506,8 @@ std::vector<Row> AllPathsExecutor::buildOneWayPathFromHashTable(bool reverse) {
auto iter = emptyPropVertices_.find(emptyPropVertex);
if (iter == emptyPropVertices_.end()) {
emptyPropVids_.emplace_back(vid);
emptyPropVertices_.emplace(emptyPropVertex);
}
emptyPropVertices_.emplace(emptyPropVertex);
}
return result;
}
Expand Down
8 changes: 8 additions & 0 deletions tests/tck/features/path/AllPath.feature
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,14 @@ Feature: All Path
| <("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"})-[:like@0 {likeness: 95}]->("Tony Parker" :player{age: 36, name: "Tony Parker"})> |
| <("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"})-[:like@0 {likeness: 95}]->("Manu Ginobili" :player{age: 41, name: "Manu Ginobili"})-[:like@0 {likeness: 90}]->("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"})-[:like@0 {likeness: 95}]->("Tony Parker" :player{age: 36, name: "Tony Parker"})> |
| <("Tim Duncan" :bachelor{name: "Tim Duncan", speciality: "psychology"} :player{age: 42, name: "Tim Duncan"})-[:like@0 {likeness: 95}]->("Tony Parker" :player{age: 36, name: "Tony Parker"})-[:like@0 {likeness: 90}]->("LaMarcus Aldridge" :player{age: 33, name: "LaMarcus Aldridge"})-[:like@0 {likeness: 75}]->("Tony Parker" :player{age: 36, name: "Tony Parker"})> |
When executing query:
"""
FIND ALL PATH WITH PROP FROM "Tim Duncan" TO "Tony Parker" OVER * UPTO 1 STEPS YIELD path as p
"""
Then the result should be, in any order, with relax comparison:
| p |
| <("Tim Duncan" :player{age: 42, name: "Tim Duncan"} :bachelor{name: "Tim Duncan", speciality: "psychology"})-[:like@0 {likeness: 95}]->("Tony Parker" :player{age: 36, name: "Tony Parker"})> |
| <("Tim Duncan" :player{age: 42, name: "Tim Duncan"} :bachelor{name: "Tim Duncan", speciality: "psychology"})-[:teammate@0 {end_year: 2016, start_year: 2001}]->("Tony Parker" :player{age: 36, name: "Tony Parker"})> |

Scenario: ALL Path constant filter
When executing query:
Expand Down