From 7c32088dec1891870a24aaa37ee5818e69f5ad6d Mon Sep 17 00:00:00 2001 From: jimingquan Date: Wed, 16 Aug 2023 12:02:03 +0800 Subject: [PATCH] fix shortest path bug (#5675) * fix shortest path bug * fix case error --------- Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> --- .../executor/algo/BFSShortestPathExecutor.cpp | 3 + .../algo/MultiShortestPathExecutor.cpp | 13 +-- .../features/path/ShortestPath.IntVid.feature | 8 +- tests/tck/features/path/ShortestPath.feature | 32 ++++++- tests/tck/features/yield/join.feature | 90 +++++++++++-------- 5 files changed, 99 insertions(+), 47 deletions(-) diff --git a/src/graph/executor/algo/BFSShortestPathExecutor.cpp b/src/graph/executor/algo/BFSShortestPathExecutor.cpp index 11ccf595d64..2fbfacb246b 100644 --- a/src/graph/executor/algo/BFSShortestPathExecutor.cpp +++ b/src/graph/executor/algo/BFSShortestPathExecutor.cpp @@ -212,6 +212,9 @@ DataSet BFSShortestPathExecutor::doConjunct(const std::vector& meetVids, Path result = leftPath.second; result.reverse(); result.append(rightPath->second); + if (result.hasDuplicateEdges()) { + continue; + } Row row; row.emplace_back(std::move(result)); ds.rows.emplace_back(std::move(row)); diff --git a/src/graph/executor/algo/MultiShortestPathExecutor.cpp b/src/graph/executor/algo/MultiShortestPathExecutor.cpp index bb20879d20c..b0d24d71092 100644 --- a/src/graph/executor/algo/MultiShortestPathExecutor.cpp +++ b/src/graph/executor/algo/MultiShortestPathExecutor.cpp @@ -111,9 +111,7 @@ void MultiShortestPathExecutor::init() { } for (const auto& leftVid : leftVids) { for (const auto& rightVid : rightVids) { - if (leftVid != rightVid) { - terminationMap_.emplace(leftVid, std::make_pair(rightVid, true)); - } + terminationMap_.emplace(leftVid, std::make_pair(rightVid, true)); } } } @@ -240,13 +238,16 @@ DataSet MultiShortestPathExecutor::doConjunct( [this](const std::vector& leftPaths, const std::vector& rightPaths, DataSet& ds) { for (const auto& leftPath : leftPaths) { for (const auto& rightPath : rightPaths) { - if (++cnt_ > limit_) { - break; - } auto forwardPath = leftPath; auto backwardPath = rightPath; backwardPath.reverse(); forwardPath.append(std::move(backwardPath)); + if (forwardPath.hasDuplicateEdges()) { + continue; + } + if (++cnt_ > limit_) { + return; + } Row row; row.values.emplace_back(std::move(forwardPath)); ds.rows.emplace_back(std::move(row)); diff --git a/tests/tck/features/path/ShortestPath.IntVid.feature b/tests/tck/features/path/ShortestPath.IntVid.feature index 9db24ca1368..1e1aa83bf2e 100644 --- a/tests/tck/features/path/ShortestPath.IntVid.feature +++ b/tests/tck/features/path/ShortestPath.IntVid.feature @@ -309,9 +309,11 @@ Feature: Integer Vid Shortest Path | FIND SHORTEST PATH FROM $a.src TO $-.dst OVER like UPTO 5 STEPS YIELD path as p """ Then the result should be, in any order, with relax comparison: - | p | - | <("Tim Duncan")-[:like]->("Manu Ginobili")> | - | <("Tim Duncan")-[:like]->("Tony Parker")-[:like]->("LaMarcus Aldridge")> | + | p | + | <("Tim Duncan")-[:like@0{}]->("Manu Ginobili")> | + | <("Tim Duncan")-[:like@0{}]->("Tony Parker")-[:like@0{}]->("LaMarcus Aldridge")> | + | <("Tim Duncan")-[:like@0{}]->("Tony Parker")-[:like@0{}]->("Tim Duncan")> | + | <("Tim Duncan")-[:like@0{}]->("Manu Ginobili")-[:like@0{}]->("Tim Duncan")> | Scenario: Integer Vid [1] Shortest Path With Limit When executing query: diff --git a/tests/tck/features/path/ShortestPath.feature b/tests/tck/features/path/ShortestPath.feature index e08cf5e51ee..97db0714509 100644 --- a/tests/tck/features/path/ShortestPath.feature +++ b/tests/tck/features/path/ShortestPath.feature @@ -354,9 +354,11 @@ Feature: Shortest Path | FIND SHORTEST PATH FROM $a.src TO $-.dst OVER like UPTO 5 STEPS YIELD path as p """ Then the result should be, in any order, with relax comparison: - | p | - | <("Tim Duncan")-[:like]->("Manu Ginobili")> | - | <("Tim Duncan")-[:like]->("Tony Parker")-[:like]->("LaMarcus Aldridge")> | + | p | + | <("Tim Duncan")-[:like@0{}]->("Manu Ginobili")> | + | <("Tim Duncan")-[:like@0{}]->("Tony Parker")-[:like@0{}]->("LaMarcus Aldridge")> | + | <("Tim Duncan")-[:like@0{}]->("Tony Parker")-[:like@0{}]->("Tim Duncan")> | + | <("Tim Duncan")-[:like@0{}]->("Manu Ginobili")-[:like@0{}]->("Tim Duncan")> | Scenario: [1] Shortest Path With Limit When executing query: @@ -639,3 +641,27 @@ Feature: Shortest Path Then the result should be, in any order, with relax comparison: | relationships | | [[:like "Tiago Splitter"->"Tim Duncan" @0 {}]] | + + Scenario: Shortest Path With Loop + When executing query: + """ + FIND SHORTEST PATH FROM "Tim Duncan" TO "Tim Duncan" OVER like BIDIRECT YIELD path as p + """ + Then the result should be, in any order, with relax comparison: + | p | + | <("Tim Duncan")<-[:like@0 {}]-("Manu Ginobili")<-[:like@0 {}]-("Tim Duncan")> | + | <("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | + | <("Tim Duncan")<-[:like@0 {}]-("Tony Parker")<-[:like@0 {}]-("Tim Duncan")> | + | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | + When executing query: + """ + FIND SHORTEST PATH FROM "Tim Duncan" TO "Tim Duncan", "Tony Parker" OVER like BIDIRECT YIELD path as p + """ + Then the result should be, in any order, with relax comparison: + | p | + | <("Tim Duncan")<-[:like@0 {}]-("Tony Parker")> | + | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tim Duncan")<-[:like@0 {}]-("Manu Ginobili")<-[:like@0 {}]-("Tim Duncan")> | + | <("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | + | <("Tim Duncan")<-[:like@0 {}]-("Tony Parker")<-[:like@0 {}]-("Tim Duncan")> | + | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | diff --git a/tests/tck/features/yield/join.feature b/tests/tck/features/yield/join.feature index 17187dac3d1..2ff3ec392e3 100644 --- a/tests/tck/features/yield/join.feature +++ b/tests/tck/features/yield/join.feature @@ -192,41 +192,61 @@ Feature: join YIELD $c.forward AS forwardPath, $c.dst AS end, $d.p AS backwordPath FROM $c INNER JOIN $d ON $c.dst == $d.src """ Then the result should be, in any order, with relax comparison: - | forwardPath | end | backwordPath | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")> | "LaMarcus Aldridge" | <("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")> | "LaMarcus Aldridge" | <("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")> | "LaMarcus Aldridge" | <("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")> | "LaMarcus Aldridge" | <("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | - | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | forwardPath | end | backwordPath | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")> | "LaMarcus Aldridge" | <("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")> | "LaMarcus Aldridge" | <("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")> | "LaMarcus Aldridge" | <("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")> | "LaMarcus Aldridge" | <("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")> | "Tim Duncan" | <("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | "Tony Parker" | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("LaMarcus Aldridge")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | + | <("Tony Parker")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")-[:like@0 {}]->("Manu Ginobili")> | "Manu Ginobili" | <("Manu Ginobili")-[:like@0 {}]->("Tim Duncan")-[:like@0 {}]->("Tony Parker")> | Scenario: multiple join When executing query: