diff --git a/tests/tck/features/match/Unwind.feature b/tests/tck/features/match/Unwind.feature index 8d9b865ce46..67b87392dab 100644 --- a/tests/tck/features/match/Unwind.feature +++ b/tests/tck/features/match/Unwind.feature @@ -116,6 +116,46 @@ Feature: Unwind clause | min | max | | false | true | + Scenario: unwind pipe ngql + When executing query: + """ + YIELD ['Tim Duncan', 'Tony Parker'] AS a + | UNWIND $-.a AS b + | GO FROM $-.b OVER like YIELD edge AS e + """ + Then the result should be, in any order: + | e | + | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] | + | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] | + | [:like "Tony Parker"->"LaMarcus Aldridge" @0 {likeness: 90}] | + | [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] | + | [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] | + When executing query: + """ + YIELD {a:1, b:['Tim Duncan', 'Tony Parker'], c:'Tim Duncan'} AS a + | YIELD $-.a.b AS b + | UNWIND $-.b AS c + | GO FROM $-.c OVER like YIELD edge AS e + """ + Then the result should be, in any order: + | e | + | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] | + | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] | + | [:like "Tony Parker"->"LaMarcus Aldridge" @0 {likeness: 90}] | + | [:like "Tony Parker"->"Manu Ginobili" @0 {likeness: 95}] | + | [:like "Tony Parker"->"Tim Duncan" @0 {likeness: 95}] | + When executing query: + """ + YIELD {a:1, b:['Tim Duncan', 'Tony Parker'], c:'Tim Duncan'} AS a + | YIELD $-.a.c AS b + | UNWIND $-.b AS c + | GO FROM $-.c OVER like YIELD edge AS e + """ + Then the result should be, in any order: + | e | + | [:like "Tim Duncan"->"Manu Ginobili" @0 {likeness: 95}] | + | [:like "Tim Duncan"->"Tony Parker" @0 {likeness: 95}] | + Scenario: unwind match with When executing query: """ @@ -146,7 +186,7 @@ Feature: Unwind clause WITH DISTINCT vid RETURN collect(vid) as vids """ - Then a SyntaxError should be raised at runtime: syntax error near `UNWIND' + Then a SyntaxError should be raised at runtime: syntax error near `WITH' When executing query: """ MATCH (a:player {name:"Tim Duncan"}) - [e:like] -> (b)