Skip to content

Commit

Permalink
fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
nevermore3 committed Jul 23, 2022
1 parent 786b2e9 commit f84da9d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/graph/optimizer/rule/RemoveNoopProjectRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ namespace opt {
// PlanNode::Kind::kIntersect, intersect has no value in result
// PlanNode::Kind::kMinus, minus has no value in result
PlanNode::Kind::kProject,
PlanNode::Kind::kUnwind,
PlanNode::Kind::kSort,
PlanNode::Kind::kTopN,
// PlanNode::Kind::kLimit, limit has no value in result
Expand Down
60 changes: 52 additions & 8 deletions tests/tck/features/match/PipeAndVariable.feature
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,65 @@ Feature: Pipe or use variable to store the lookup results
LOOKUP ON player
WHERE player.name == 'Tim Duncan'
YIELD player.age as age, id(vertex) as vid
| UNWIND $-.vid as a RETURN a
| UNWIND $-.vid as a | YIELD $-.a AS id
"""
Then a SyntaxError should be raised at runtime: syntax error near `UNWIND'
Then the result should be, in any order, with relax comparison:
| id |
| "Tim Duncan" |
When executing query:
"""
GET SUBGRAPH 2 STEPS FROM "Tim Duncan" BOTH like YIELD edges as e
| UNWIND $-.e as a RETURN a
"""
Then a SyntaxError should be raised at runtime: syntax error near `UNWIND'
| UNWIND $-.e as a | YIELD $-.a AS a
"""
Then the result should be, in any order, with relax comparison:
| a |
| [:like "Aron Baynes"->"Tim Duncan" @0 {}] |
| [:like "Boris Diaw"->"Tim Duncan" @0 {}] |
| [:like "Danny Green"->"Tim Duncan" @0 {}] |
| [:like "Dejounte Murray"->"Tim Duncan" @0 {}] |
| [:like "LaMarcus Aldridge"->"Tim Duncan" @0 {}] |
| [:like "Manu Ginobili"->"Tim Duncan" @0 {}] |
| [:like "Marco Belinelli"->"Tim Duncan" @0 {}] |
| [:like "Shaquille O'Neal"->"Tim Duncan" @0 {}] |
| [:like "Tiago Splitter"->"Tim Duncan" @0 {}] |
| [:like "Tony Parker"->"Tim Duncan" @0 {}] |
| [:like "Tim Duncan"->"Manu Ginobili" @0 {}] |
| [:like "Tim Duncan"->"Tony Parker" @0 {}] |
| [:like "Damian Lillard"->"LaMarcus Aldridge" @0 {}] |
| [:like "Rudy Gay"->"LaMarcus Aldridge" @0 {}] |
| [:like "LaMarcus Aldridge"->"Tony Parker" @0 {}] |
| [:like "Boris Diaw"->"Tony Parker" @0 {}] |
| [:like "Dejounte Murray"->"Chris Paul" @0 {}] |
| [:like "Dejounte Murray"->"Danny Green" @0 {}] |
| [:like "Dejounte Murray"->"James Harden" @0 {}] |
| [:like "Dejounte Murray"->"Kevin Durant" @0 {}] |
| [:like "Dejounte Murray"->"Kyle Anderson" @0 {}] |
| [:like "Dejounte Murray"->"LeBron James" @0 {}] |
| [:like "Dejounte Murray"->"Manu Ginobili" @0 {}] |
| [:like "Dejounte Murray"->"Marco Belinelli" @0 {}] |
| [:like "Dejounte Murray"->"Russell Westbrook" @0 {}] |
| [:like "Dejounte Murray"->"Tony Parker" @0 {}] |
| [:like "Danny Green"->"LeBron James" @0 {}] |
| [:like "Danny Green"->"Marco Belinelli" @0 {}] |
| [:like "Marco Belinelli"->"Danny Green" @0 {}] |
| [:like "Marco Belinelli"->"Tony Parker" @0 {}] |
| [:like "Yao Ming"->"Shaquille O'Neal" @0 {}] |
| [:like "Shaquille O'Neal"->"JaVale McGee" @0 {}] |
| [:like "Tiago Splitter"->"Manu Ginobili" @0 {}] |
| [:like "Tony Parker"->"LaMarcus Aldridge" @0 {}] |
| [:like "Tony Parker"->"Manu Ginobili" @0 {}] |
| [:like "James Harden"->"Russell Westbrook" @0 {}] |
| [:like "Chris Paul"->"LeBron James" @0 {}] |
| [:like "Russell Westbrook"->"James Harden" @0 {}] |
When executing query:
"""
FIND SHORTEST PATH FROM "Tim Duncan" TO "Yao Ming" OVER like YIELD path as p
| UNWIND $-.p as a RETURN a
FIND SHORTEST PATH FROM "Tim Duncan" TO "Tony Parker" OVER like YIELD path as p
| YIELD nodes($-.p) AS nodes | UNWIND $-.nodes AS a | YIELD $-.a AS a
"""
Then a SyntaxError should be raised at runtime: syntax error near `UNWIND'
Then the result should be, in any order, with relax comparison:
| a |
| ("Tim Duncan") |
| ("Tony Parker") |
When executing query:
"""
GO 2 STEPS FROM "Tim Duncan" OVER * YIELD dst(edge) as id
Expand Down

0 comments on commit f84da9d

Please sign in to comment.